mysql5.7以后排序在分组,查询每组最新记录
作者:互联网
原创地址:https://blog.csdn.net/qq_40012458/article/details/121745497
感谢博主的文章!别人已经写得很不错了,我就不写了,写个语句放在这里供参考
SELECT
id,project_id,progress_content
FROM
(
SELECT DISTINCT(id),project_id, progress_content FROM tb_projectprogress ORDER BY id DESC
) AS tpp
GROUP BY
project_id
标签:content,mysql5.7,每组,project,分组,csdn,progress,id,SELECT 来源: https://www.cnblogs.com/xiaokangk/p/16087204.html