http://xiaomogui.iteye.com/blog/538642 假如每个年龄我们只取一条记录。 select *, count(distinct age) from person group by age