MySQL: Look for top 3 in each group

Tags:
Microsoft Access
MySQL
I know this has been discussed MANY MANY times, but I've used all the previous answers and still have issues.
In my table we have to look for top 3 in each group and show ties. So if there is a tie it should return more than 3 rows.
I have a working MS Access query, but MySQL doesn't use TOP and LIMIT can't be used with IN... So now I have to start all over.
Further, If this proves to be to difficult, I can use 2 queries: first report ties (in top 3 of each group) and fix them (ties will not be allowed - this is a contest with only 3 winners and we will need to break ties) and second, display results...
 
entrynum (int, key, unique), class (string), score (int)
1	aaa	5
2	bbb	9
3	ccc	7
4	bbb	9
5	eee	6
6	bbb	7
7	bbb	9
8	bbb	10
9	ccc	10

I need returned:
1	aaa	5
8	bbb	10
2	bbb	9
4	bbb	9
7	bbb	9
6	bbb	8
9	ccc	10
3	ccc	7
5	eee	6


Software/Hardware used:
MySQL version: 5.5.50
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: