根据讨论,你需要将datetime转换为date和 group by 子句列至今 为了你的table
SELECT p.`zdjh` AS MSN, max(p.`sjsj`) AS Date_Time,max( p.`xhqd`) AS Ping
FROM `tj_xhqd` p
WHERE p.`sjsj` <='2018-07-24 10:15:00' AND p.`sjsj` >='2018-07-23 10:15:00'
group by zdjh
ORDER BY MSN, Date_Time, Ping DESC
1条答案
按热度按时间yqyhoc1h1#
根据讨论,你需要将datetime转换为date和
group by
子句列至今为了你的table