select top 10 商品编号 = b.goodsId,商品名称 = b.goodsName,销售数量 = sum(c.quantity)
from GoodsType a join GoodsInfo b on a.typeId = b.typeId
join OrderGoodsInfo c on b.goodsId = c.goodsId
where a.typeName = '野营用品'group by b.goodsId,b.goodsName order by c.quantity desc
go