I just made this post a little while ago: SQL query concerning the sum of occurrences for multiple rows
The table below is the same but with a slight modification:
Test
+--------+--------+--------+--------+
| Name | Date |Location| Score |
+--------+--------+--------+--------+
| Steven |03-05-12| 120000 | 78 |
+--------+--------+--------+--------+
| James |04-09-11| 110000 | 67 |
+--------+--------+--------+--------+
| James |06-22-11| 110000 | 58 |
+--------+--------+--------+--------+
| Ryan |10-11-13| 250000 | 62 |
+--------+--------+--------+--------+
| Ryan |12-19-13| 180000 | 95 |
+--------+--------+--------+--------+
Essentially, I need a query to select the names of people who have taken multiple tests and gotten a lower score the next time.
For example, it would select James but not Ryan because he got a higher score the second time.
Thanks