--------------------------------
|uid |lesson_score |date       |
--------------------------------
|1   |2            |1391023460 |
|1   |4            |1391023518 |
|2   |3            |1391023557 |
|1   |8            |1391023596 |
--------------------------------
How do I determine the maximum and minimum scores for a particular user, and their respective date?
So far I have this:
SELECT MAX(lesson_score) AS max_lesson_score, MIN(lesson_score) AS min_lesson_score, date
FROM user_progress 
WHERE uid = 1
What I need to get is this:
min: 2, 1391023460
max: 8, 1391023460
I know it's returning the correct min and max score, but it's only returning one date, and I'm not even sure WHICH date it's returning...
Thanks!
 
     
     
    