with top10 as (SELECT
depositor_address,
sum(supplied_usd) as toptensupply
FROM aave.deposits
where supplied_usd is not null
GROUP BY 1
order by 2 desc
limit 10),
total as (SELECT
sum(supplied_usd) as totalsupply
FROM aave.deposits
where supplied_usd is not null
),
final as (select sum(A.toptensupply) as Top10_Supply, B.totalsupply, (sum(A.toptensupply)/B.totalsupply)*100 as Percentage
from top10 A, total B
group by 2)
select * from final