5
SELECT * FROM `scores` natural join users 
GROUP BY user_id,`level_id` 
order by level_id,time_to_win

How do i limit the results such that for each level_id it will only put top 10 (or less) in the results?

Ofek Ron
  • 8,354
  • 13
  • 55
  • 103
  • If you like, consider following this simple two-step course of action: 1. If you have not already done so, provide proper DDLs (and/or an sqlfiddle) so that we can more easily replicate the problem. 2. If you have not already done so, provide a desired result set that corresponds with the information provided in step 1. – Strawberry Sep 11 '15 at 08:35
  • 2
    I think we could have left this question open. I was 30 seconds away from posting what I believe could be a correct answer. – Tim Biegeleisen Sep 11 '15 at 08:44
  • I didnt find a sufficient answer in the thread suggested. I believe there is simpler way to do what i am trying to do. – Ofek Ron Sep 11 '15 at 08:48
  • order by level_id,time_to_win LIMIT 10 – jarlh Sep 11 '15 at 08:53

0 Answers0