Lets say i had a table with two fields..
project_name varchar(20)
error_description varchar(20)
and it was full of entries for various projects.. How would I determine what the top 3 occurances for error_description are for each project and their occurance count?
e.g. i could get a list of # of occurances of ALL errors through something like this:
select project_name,error_description,count(error_description)
from tablename
group by error_description;
But how to get only the top 3?
I'm using mysql 4.0.x which does not support sub-queries. I'm thinking i need to create a temporary table but can't seem to get it right.
need help..
project_name varchar(20)
error_description varchar(20)
and it was full of entries for various projects.. How would I determine what the top 3 occurances for error_description are for each project and their occurance count?
e.g. i could get a list of # of occurances of ALL errors through something like this:
select project_name,error_description,count(error_description)
from tablename
group by error_description;
But how to get only the top 3?
I'm using mysql 4.0.x which does not support sub-queries. I'm thinking i need to create a temporary table but can't seem to get it right.
need help..