Advanced Aggregates. Exercice number7(Prodcut Sum2


#1

select name, round(sum(amount_paid) /
(select amount_paid from order_items) * 100.0, 2) as pct
from order_items amount_paid
group by 1
order by 2 desc;

Can someone help me and show me where the mistake is? Thanks mate


#2

select name, round(sum(amount_paid) /
(select sum(amount_paid) from order_items) * 100.0, 2) as pct
from order_items
group by 1
order by 2 desc;

credit: https://discuss.codecademy.com/t/7-product-sum-2-placement-issues/20376?u=asitnik