我有一個表如下。需要查詢來選擇用戶的最後一項活動。 (這裏不應該是相同的用戶,單用戶單排多個上市)女士訪問/ SQL查詢
+----------------+---------+--------------------+-----------------+------------+
| Date | BOT_ID | Process | LastModified | Status |
+----------------+---------+--------------------+-----------------+------------+
| 17/09/26 00:00 | User 1 | Interaction record | 9/19/2017 10:50 | In Process |
| 17/09/26 00:00 | User 2 | Single Assessed | 9/26/2017 12:00 | In process |
| 17/09/26 00:00 | User 3 | Interaction record | 9/26/2017 11:35 | Completed |
| 17/09/26 00:00 | User 4 | Metering | 9/26/2017 11:50 | In proce |
| 17/09/26 00:00 | User 1 | Move In | 9/26/2017 11:50 | In process |
| 17/09/26 00:00 | User 4 | Interaction record | 9/26/2017 11:58 | Completed |
| 17/09/26 00:00 | User 5 | Direct Debit | 9/26/2017 11:10 | Completed |
| 17/09/26 00:00 | User 17 | latest | 9/26/2017 0:15 | In Process |
+----------------+---------+--------------------+-----------------+------------+
問題是? –
您對Access或MySQL有疑問嗎?請只使用適當的標籤。 – Barmar
在MySQL中它會是:https://stackoverflow.com/questions/7745609/sql-select-only-rows-with-max-value-on-a-column?rq=1也許它在Access中類似。 – Barmar