I have a table called ‘Audit’ in SQL Server 2005 like this:
Name | Last Logged On Date
--------| -----------------------
Joe | 2012-02-01 00:00:00.000
Joe | 2012-02-02 00:00:00.000
Bloggs | 2012-03-01 00:00:00.000
Bloggs | 2012-03-02 00:00:00.000
I want to only get the distinct on the first time the person logged on.
So in other words, I want to return:
Name | First Logged On Date
--------| -----------------------
Joe | 2012-02-01 00:00:00.000
Bloggs | 2012-03-01 00:00:00.000
How would I achieve this?
Help!!!
If I understand your question right, it should work for you