select 年龄,count(id) as 数量 from 表名 where 姓名='张三' group by 年龄 分组统计.不能按ID倒序.
select distinct 年龄 from 表名 where 姓名="张三" order by 年龄 desc