7. Product sum 2


#1

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;

I just don't understand what is the meaning of * 100.0,2) as pct. Also, why is there a ) at the end of number 2


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.