sql语句分类汇总,排序查询语句怎么实现

2025-04-08 16:21:23
推荐回答(1个)
回答1:

select 商品id,sum(商品数量) 商品数量 from 表名 group by 商品id order by sum(商品数量) desc

这样试试