asp access查询条件等于一个人的不同的数据

2025-03-24 02:53:44
推荐回答(2个)
回答1:

select 年龄,count(id) as 数量 from 表名 where 姓名='张三' group by 年龄

分组统计.不能按ID倒序.

回答2:

select distinct 年龄 from 表名 where 姓名="张三" order by 年龄 desc