I have a table like,
contractId date value
1 09/02/2011 A
2 13/02/2011 C
4 02/02/2011 D
6 08/02/2011 A
7 12/02/2011 C
9 22/01/2011 C
How can I access the last record’th(9) previous record(contractId – 7)?. Is there any SQL query available?.
This query reverses your table and gets one record from the position 1 (so it will be the second row; 0 is the first one).