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