题解 | #返回产品名称和每一项产品的总订单数#
返回产品名称和每一项产品的总订单数
http://www.nowcoder.com/practice/1c64fd9048364a58a8ffa541720359a4
select p.prod_name , count(o.order_num) as orders
from Products p left join OrderItems o
on p.prod_id = o.prod_id
group by prod_name
order by p.prod_name asc