比如有一张表
编号 类型 数量
1 A 2
2 B 4
3 C 6
4 D 2
5 E 5
统计大于2的数据
2条回答 默认 最新
自在猫先生 2022-02-26 13:21关注select no,type,sum(counts) as counts from table where counts>=2 group by no,type本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 编辑记录
select no,type,sum(counts) as counts
from table
where counts>=2
group by no,type