U moet aggregeren met MIN
. Zoiets zou moeten werken (niet getest):
SELECT user_id, track_id, lap_status, MIN(lap_times) AS best_time
FROM tbl_lap_times
GROUP BY user_id, track_id, lap_status
ORDER BY best_time DESC
LIMIT 10
U moet aggregeren met MIN
. Zoiets zou moeten werken (niet getest):
SELECT user_id, track_id, lap_status, MIN(lap_times) AS best_time
FROM tbl_lap_times
GROUP BY user_id, track_id, lap_status
ORDER BY best_time DESC
LIMIT 10