# 需求分析 # 查找购买个数超过20, # 质量小于50的商品, # 按照商品id升序排序 SELECT a.id,a.name,MAX(a.weight) AS weight,SUM(b.count) as total FROM goods a LEFT JOIN trans b on a.id=b.goods_id group by a.id,a.name having MAX(a.weight)<50 and SUM(b.count)>20 order by a...