题解 | #返回产品名称和每一项产品的总订单数#
返回产品名称和每一项产品的总订单数
https://www.nowcoder.com/practice/1c64fd9048364a58a8ffa541720359a4
select Products.prod_name ,count(OrderItems.order_num) from OrderItems right join Products on OrderItems.prod_id = Products.prod_id group by Products.prod_name order by Products.prod_name
注意 外连接right join 可能存在产品没有订单,也要显示和统计,


