# where子句放在子查询内
select
prod_name,
(select sum(quantity) from OrderItems b
where a.prod_id = b.prod_id
group by prod_id) as quant_sold
from Products a
;

# where子句放在子查询内
select
prod_name,
(select sum(quantity) from OrderItems b
where a.prod_id = b.prod_id
group by prod_id) as quant_sold
from Products a
;