with slp_balance as (
select
contract_address,
sum(balance) as tvl,
max(balance) as top_provider,
(top_provider/tvl)*100 as pcg_top_provider
from ethereum.erc20_balances
where contract_label = 'sushiswap'
and symbol = 'SLP'
and balance > 0
and balance_date = CURRENT_DATE - 1
group by 1
)
select
count(case when pcg_top_provider>50 then 1 end) as "Pools with Top provider above 50%",
count(case when pcg_top_provider<=50 then 1 end) as "Pools with Top provider below 50%"
from slp_balance_and_users