select  id,name,weight,total from (goods g join (select goods_id sum(count) as total from trans t group by goods_id) b on g.id = b.goods_id ) c where c.weight<50 and c.total >20; 大神,我这样写有错误没?