select 编号 ,姓名 ,count(数量)from 表group by编号,姓名
select count(*) from 表名 group by 姓名
代码如下:SELECT distinct T1.Name as Name,(select sum(Value) from TEST T2 where T2.Name = T1.Name) as Value FROM TEST T1