Is it possible to select a list of rows from this table format based on distinct fk2 and > date?
Table
pk fk1 fk2 value date
1 1 1 100 1/1/2009
2 1 2 110 1/1/2009
3 1 2 120 5/1/2009
4 1 3 130 1/1/2009
I would like it to return rows 1,3,4
I only pass in fk1
Select * from table where fk1=1 'and the row with the latest date for each fk2?
Regards