select
Address
count(distinct tx_id) as TX_Count,
row_number() over (order by TX_Count DESC) as rank,
count(distinct delegator) as Users_Count,
sum(amount) as Total_Volume
from flow.gov.ez_staking_actions --join flow.gov.dim_validator_labels using(node_id)
--where tx_succeeded = 'TRUE'
group by 1 ,2