题解 | 商品交易(网易校招笔试真题)
select g.id,g.name,g.weight,sum(t.count) as total from goods g left join trans t on g.id = t.goods_id where weight<50 group by g.id having total >20 order by g.id;
select g.id,g.name,g.weight,sum(t.count) as total from goods g left join trans t on g.id = t.goods_id where weight<50 group by g.id having total >20 order by g.id;
相关推荐