with staking as (
select
date_trunc('week', block_timestamp) as weekly_date,
sum(stake_amount/1e18) as stake_volume_count,
count(distinct tx_hash) as tx_hash_count,
count(distinct tx_signer) as tx_signer_count
from near.core.dim_staking_actions
where action='Stake'
and weekly_date >= '2022-01-01'
and weekly_date <= '2022-12-31'
group by weekly_date
)
select * from staking