select a.* from (Select 店铺名称, 货号, sum(订单数量) as 总数量 from {表c} group by 店铺名称, 货号) as a where 1 > (select count(*) from (Select 店铺名称, 货号, sum(订单数量) as 总数量 from {表c} group by 店铺名称, 货号) as b where b.店铺名称 = a.店铺名称 and b.总数量 > a.总数量 ) order by a.店铺名称, a.总数量