Thank you all for the detailed suggestions. When everything was said and done, I needed to use a correlated subquery . Essentially, this is what I had to do:
SELECT acn, ssn, [date] FROM Account a WHERE NOT EXISTS (SELECT 1 FROM Account WHERE ssn = a.ssn AND [date] < a.[date])
Hope this helps someone.
I never updated this ... In my final submission, I achieved this through the left join to increase efficiency (the correlated subquery was not acceptable, as it took a considerable amount of time to run, checking each record for more than 150 thousand others).
Here is what should have been done to solve my problem:
SELECT acn, ssn FROM Account a LEFT JOIN (SELECT ssn, COUNT(1) AS counter FROM Account GROUP BY ssn) AS counters ON a.ssn = counters.ssn WHERE counter IS NULL OR counter = 0
Buekow
source share