Given a table like this:
tblScores
ID Name Date Score
1 Adam 8/9/11 100
2 Bill 8/9/11 95
3 Charles 8/9/11 98
4 Adam 8/8/11 100
5 Bill 8/8/11 88
6 Charles 8/8/11 93
7 Adam 8/7/11 100
8 Bill 8/7/11 89
9 Charles 8/7/11 97
This is just an example of course.
I am trying to think of a query that will tell me the name of every person who has had a score of 100 for the past 3 days in a row (i.e. the most recent 3 days)
In this example
select name from tblScores where {most recent three records in this table have score = 100}
and in this example, the query would return "Adam"
Anybody?




Reply With Quote