select
count(distinct tx_id) as txns_count,
count(distinct delegator_address) as users_count,
count(distinct validator_address) as validators_count,
sum(amount/ pow(10, 6)) as total_fee,
avg(amount/ pow(10, 6)) as avg_fee
from terra.core.ez_staking
where action = 'Delegate'
and tx_succeeded = 1
and year(block_timestamp) >= 2023