I have a table that records when a user logs in.
I want to find all the users that have logged in within the last year.
So, simplified I have
| Client_ID | DateLoggedIn |
| 1 | 05/02/10 |
| 2 | 14/05/11 |
| 1 | 26/05/11 |
| 3 | 18/04/10 |
| 2 | 21/12/11 |
I’m trying to return the ClientID with the most recent date
eg:
| Client_ID | DateLoggedIn |
| 1 | 26/05/11 |
| 2 | 21/12/11 |
| 3 | 18/04/10 |
I have tried using Group By and tried the UNION join, but I think I’m doing something wrong…
All help gratefully received !!!
Thanks folks 🙂
Similar to the other Mark: