ecshop 查询订单商品表:
select rec_id,goods_name,group_concat(goods_number order by goods_number desc) from ecs_order_goods group by goods_id;

得到结果:
mysql散记 2018

这个主要是看group_concat 和 group by 的用法

ecshop 查询 订单商品表 直接返回 销量总和:
select rec_id,goods_name,sum(goods_number) as numb from ecs_order_goods group by goods_id order by numb desc;

结果为:
mysql散记 2018