Help with MAX query

PankajBanga

Pankaj Banga
Local time
Tomorrow, 01:42
Joined
Jan 17, 2005
Messages
12
My data looks something like this

SecurityID Date CloseDiluted
1074 02/02/2005 0.09
1074 11/10/2004 0.1
1074 09/07/2003 0.1
1074 28/06/2002 0.13
1074 06/08/2001 0.2146524

I want my result set to show records for most recent date and date prior to it? Eg.

SecurityID Date CloseDiluted
1074 11/10/2004 0.1
1074 02/02/2005 0.09

How can i do this? Thanks
 
got it working

got it working using

SELECT TOP 2 [Date], CloseDiluted
FROM tblSecurityDay
WHERE SecurityID = 1074
ORDER BY [Date] DESC
 

Users who are viewing this thread

Back
Top Bottom