與組返回最近的值我有此查詢:如何通過
SELECT history.trackid, tracklist.artist, tracklist.event, tracklist.data, history.date
FROM history JOIN tracklist ON history.trackid=tracklist.trackid
GROUP BY trackid
ORDER BY history.date DESC
但我想最近trackid
(由date
)將返回當我history
組。
試過GROUP BY
和ORDER BY DESC
,但不是最新的。我錯在哪裏?