题解 | #从 Products 表中检索所有的产品名称以及对应的销售总数#
从 Products 表中检索所有的产品名称以及对应的销售总数
http://www.nowcoder.com/practice/2b289b78de1546f38fd24e17e56f1bec
from Products
join (select prod_id,sum(quantity) as quant_sold
from OrderItems
group by prod_id) t using (prod_id)
注:子表要命名不然报错