MLDZMNstk2
Updated 2024-01-04
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
›
⌄
select
date_trunc('month',BLOCK_TIMESTAMP) as date,
'Stake' as action,
count(distinct tx_hash) as no_action,
count(distinct ORIGIN_FROM_ADDRESS) as no_users,
sum(DECODED_LOG:amount/1e18) as volume,
avg(DECODED_LOG:amount/1e18) as avg_volume,
sum(volume) over (order by date) as cum_volume
from avalanche.core.ez_decoded_event_logs
where EVENT_NAME='StakeToken'
and DECODED_LOG:token='0xb27c8941a7df8958a1778c0259f76d1f8b711c35'
and CONTRACT_ADDRESS='0x53a893498313d05f023efd86a7aea0fd783c7bc2'
group by 1
union all
select
date_trunc('month',BLOCK_TIMESTAMP) as date,
'Unstake' as action,
count(distinct tx_hash) as no_action,
count(distinct ORIGIN_FROM_ADDRESS) as no_users,
sum(DECODED_LOG:amount/1e18) as volume,
avg(DECODED_LOG:amount/1e18) as avg_volume,
sum(volume) over (order by date) as cum_volume
from avalanche.core.ez_decoded_event_logs
where EVENT_NAME='UnstakeToken'
and DECODED_LOG:token='0xb27c8941a7df8958a1778c0259f76d1f8b711c35'
and CONTRACT_ADDRESS='0x53a893498313d05f023efd86a7aea0fd783c7bc2'
group by 1
QueryRunArchived: QueryRun has been archived