On SQL 2005 or later, you can use dense_rank function like this:;WITH cte AS( SELECT *, DENSE_RANK() OVER (ORDER BY date DESC) AS RN FROM YourTable)SELECT * FROM cte WHERE RN = 2;
That assumes that your date column is of data type datetime or small datetime.If you have a time part to the data in the date column you would need to change the order by clause to one of these:ORDER BY CAST(date AS DATE) DESCORDER BY DATEADD(dd,DATEDIFF(dd,0,date),0) DESC