elsina2024-08-19: Monthly activity per user
Updated 2024-10-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
›
⌄
with users as (
SELECT
date_trunc('month', block_timestamp) as date,
signer_id as user,
count(DISTINCT tx_hash) as tx_count,
count(DISTINCT address) as staking_pool_count,
sum(amount) as total_vol,
avg(amount) as avg_tx_vol,
from
near.gov.fact_staking_actions
where
action in ('staking', 'unstaking')
group by
date, user
)
select
date,
avg(tx_count) as avg_tx_count_per_user,
avg(staking_pool_count) as avg_pool_count_per_user,
avg(total_vol) as avg_tot_vol_per_user
from
users
group by
date
order by
date asc
QueryRunArchived: QueryRun has been archived