I have one table having
**user_id** | **date**
1 | 2012-10-18 09:34:4
3 | 2012-10-18 09:34:54
5 | 2012-10-17 09:14:54
6 | 2012-10-17 09:13:24
4 | 2012-10-16 08:34:54
9 | 2012-10-16 08:34:54
What I want is user_id with latest date-time i.e
**user_id** | **date**
3 | 2012-10-18 09:34:54
5 | 2012-10-17 09:14:54
4 | 2012-10-16 08:34:54
Try this:
Note: This is a mysql-only solution, but it works!