with addresses AS (
select
delegator_address,
count(tx_id) as numofdelegating
from terra.staking
where action = 'delegate'
and tx_status = 'SUCCEEDED'
group by 1
ORDER BY 2 DESC)
select
count(delegator_address),
numofdelegating
--100* (count(delegator_address) / 53662) as percentage
from addresses
group by 2
order by 2 asc
LIMIT 10