mysql 根据某个字段去掉重复的记录

来源:互联网 发布:命令行登录mysql 编辑:程序博客网 时间:2024/04/29 06:19

http://xiaomogui.iteye.com/blog/538642

假如每个年龄我们只取一条记录。

select *, count(distinct age) from person group by age