View Single Post
  #4 (permalink)  
Old 03-27-2008, 11:11 PM
orshoe@gmail.com
 
Posts: n/a
Default ANY answer. Re: How to find distinct users based on last logon

Hi, on similar lines, if I have a table with accounts, users and last_on_date, how can I find the user who accessed an account most recently.

Say, the table is as follows:
a/c user date
---- ---- -----------
a1 u1 03/04/2007
a1 u2 03/05/2007
a2 u3 03/05/2007
a2 u1 03/07/2007
a2 u2 03/06/2007
a3 u3 04/05/2007

What query would fetch the following:
a/c user date
---- ---- -----------
a1 u2 03/05/2007
a2 u1 03/07/2007
a3 u3 04/05/2007

Any help is appreciated.
Orshoe
Reply With Quote