Arionear Transparency - staking Users
Updated 2023-01-09Copy Reference Fork
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
28
29
30
31
32
33
34
35
36
›
⌄
with
staking_user as (
select
date_trunc('week', BLOCK_TIMESTAMP) as date,
count(distinct TX_SIGNER) as "# Staker",
sum(STAKE_AMOUNT / pow(10, 24)) as "Stake Volume",
"Stake Volume" / "# Staker" as "Stake Volume per User"
from
near.core.dim_staking_actions
where
1 = 1
and ACTION = 'Stake'
and BLOCK_TIMESTAMP >= '2022-07-01'
and STAKE_AMOUNT is not null
group by
1
),
Unstaking_user as (
select
date_trunc('week', BLOCK_TIMESTAMP) as date,
count(distinct TX_SIGNER) as "# Unstaker",
sum(STAKE_AMOUNT / pow(10, 24)) as "Unstake Volume",
"Unstake Volume" / "# Unstaker" as "Unstake Volume per User"
from
near.core.dim_staking_actions
where
1 = 1
and ACTION = 'Unstake'
and BLOCK_TIMESTAMP >= '2022-07-01'
and STAKE_AMOUNT is not null
group by
1
)
select
date,
"# Staker",
Run a query to Download Data