If i had a table with a varchar which was being used as a description of some error, and i wanted to know which error descriptions occured the most often, how would you go about query the top 3 description occurances and how many times the occured?
e.g. i could get a list of # of occurance of ALL errors through something like this:
select description,count(description)
from tablename
group by description;
But how to get only the top 3?
I'm using mysql 4.0.x
e.g. i could get a list of # of occurance of ALL errors through something like this:
select description,count(description)
from tablename
group by description;
But how to get only the top 3?
I'm using mysql 4.0.x