mysql 查找多个值并且取最大值一个和分组

SELECT
    eco_truename,
    eco_uid,
    max(checkup_time) AS time
FROM
    es_checkup_order
WHERE
    checkup_time < 1469944460
GROUP BY
    eco_uid
ORDER BY
    checkup_time DESC

 

posted @ 2017-08-30 14:04  freedom/cn  阅读(1612)  评论(0编辑  收藏  举报