📅  最后修改于: 2022-03-11 15:05:15.200000             🧑  作者: Mango
SELECT train, dest, time FROM (
SELECT train, dest, time,
RANK() OVER (PARTITION BY train ORDER BY time DESC) dest_rank
FROM traintable
) where dest_rank = 1