I have a MySQL table containing benchmarks like so..
benchmarkid     playerid         verified     benchmark  resultnumber   testdate  
1               70               1            40msprint  6.0            2013-06-03      
2               70               1            40msprint  6.1            2013-06-04      
3               70               1            40msprint  6.3            2013-06-05  
4               71               1            40msprint  6.0            2013-06-03      
5               71               1            40msprint  6.1            2013-06-04      
6               71               1            40msprint  6.3            2013-06-05  
I would like to query that table with a date for the benchmark "40msprint" to get the current result for that date and the last known result at that time for each player.
Eg at 2013-06-04 for verified=1 40msprint for players 70 and 71 it would look like.
playerid    currentresult       previousresult  previousdate        
70          6.1                     6.0         2013-06-03      
71          6.1                     6.0         2013-06-03  
I will also know the playerid's i want to find and there will only be about 20 at a time.
Any ideas for a MySql query that would get me this?
 
    