我想問一個簡單的查詢我可以用它來了解每個最新的登錄日期爲我的用戶...... 感謝查詢的最近的登錄日期爲當前日期爲每個用戶
+----+---------+------------+-----------+---------------------+
| id | version | first_name | last_name | login_detail |
+----+---------+------------+-----------+---------------------+
| 1 | 0 | Mark | Yap2 | 2013-02-01 16:00:23 |
| 2 | 0 | Mark | Yap2 | 2013-02-01 16:00:38 |
| 3 | 0 | Mark | Yap2 | 2013-02-04 13:38:41 |
| 4 | 0 | john | doe | 2013-02-04 13:50:39 |
| 5 | 0 | Mark | Yap2 | 2013-02-04 13:59:01 |
| 6 | 0 | Mark | Yap2 | 2013-02-04 14:04:25 |
| 7 | 0 | john | doe | 2013-02-04 14:09:47 |
| 8 | 0 | Mark | Yap2 | 2013-02-04 14:14:40 |
| 9 | 0 | Mark | Yap2 | 2013-02-04 14:15:36 |
| 10 | 0 | john | doe | 2013-02-04 14:16:11 |
| 11 | 0 | Mark | Yap2 | 2013-02-04 14:23:38 |
| 12 | 0 | john | doe | 2013-02-04 14:26:53 |
| 13 | 0 | john | doe | 2013-02-04 15:50:45 |
| 14 | 0 | john | doe | 2013-02-04 15:55:53 |
| 15 | 0 | john | doe | 2013-02-04 15:59:15 |
| 16 | 0 | john | doe | 2013-02-04 16:05:15 |
| 17 | 0 | john | doe | 2013-02-04 16:09:54 |
+----+---------+------------+-----------+---------------------+
此示例表... 我想獲得最新的登錄記錄每個用戶... 這與ID爲17和11的2個不同的用戶
'當前' 日期可以過去?或者你只是在尋找每個用戶的最近登錄日期? – Strawberry