I have a history table that contains a score per group per date (PK is group, date). What is the SQL query that can retrieve the scores for all groups for the 2nd most recent date?
ETA: The dates are the same across groups (each score is entered into the history table at the same time for each group).
Setup:
The query would looks as simple as below for MS SQL 2005 +