select validator_name,
count (distinct tx_id) as TX_Count,
count (distinct signers[0]) as Users_Count,
abs (sum ((post_tx_staked_balance - pre_tx_staked_balance)/1e9)) as Total_Volume,
abs (avg ((post_tx_staked_balance - pre_tx_staked_balance)/1e9)) as Average_Volume
from solana.core.ez_staking_lp_actions
where succeeded = 'TRUE'
and block_timestamp >= CURRENT_DATE - 7
and event_type in ('undelegate','deactivate','withdraw')
and node_pubkey is not null
and event_type is not null
group by 1
order by 2 DESC
limit 10