from MyTax mt1
select Code,ID,TaxYear,Data,max(date) as FinalDate
groupby Code,ID,TaxYear,Data) mt2
on mt1.Code = mt2.Code and mt1.ID = mt2.ID
and mt1.Data = mt2.Data and mt1.TaxYear = mt2.TaxYear
and mt1.date = mt2.date
As Naerling and thatraja pointed out, there is no question, and we don't spood-feed, read the article thatraja linked, or if you are lazy brain-wise, buy Linqer (or any other SQL to LINQ conversion tool).
Last Visit: 31-Dec-99 18:00 Last Update: 27-Aug-16 4:53