题解 | #商品交易(网易校招笔试真题)#
商品交易(网易校招笔试真题)
https://www.nowcoder.com/practice/f257dfc1b55e42e19eec004aa3cb4174
select b.id,b.name,b.weight,sum(a.count) as total from trans as a inner join goods as b on b.id=a.goods_id where b.weight <50 group by id,name,weight having total >20 order by id