/* 6-8．商品毎の販売総数の上位を確認 */

select p.product_code, p.product_name, sum(s2.product_count) as allcount
from product as p left join sale2 as s2 on p.product_code = s2.product_code
group by p.product_code, p.product_name
having sum(s2.product_count) >= 20
order by sum(s2.product_count) desc;