ANY answer.
Re: How to find distinct users based on last logon
[sql]
select * from users t0 where laston=(select max(t1.laston) from users t1 where t0.id=t1.id);
[/sql]
Discussion: if the user has logged on multiple times the same last logon day, then there would be multiple rows in the result for that user and you need more criteria to differentiate between those rows.
Hoe this helps,
Dimitar
|