Yousefi_1994Staking/Unstaking Cumulative amount In the last 90 days
Updated 2022-07-03
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
›
⌄
with stake as (
select
block_timestamp::date as days,
count(distinct tx_hash) as number_of_stake,
sum((tx_json:receipt:logs[0]:decoded:inputs:value::float)/1e9) as stake_amount,
sum(stake_amount) over (order by days) as cumulative_stake_amount
from ethereum.core.fact_transactions
where origin_function_signature = '0xd866c9d8'
and to_address = '0x759c6de5bca9ade8a1a2719a31553c4b7de02539'
and status = 'SUCCESS'
and block_timestamp::date >= current_date - 90
group by days
order by days
),
unstake as (
select
block_timestamp::date as days,
count(distinct tx_hash) as number_of_unstake,
sum((tx_json:receipt:logs[1]:decoded:inputs:value::float)/1e9) as unstake_amount,
sum(unstake_amount) over (order by days) as cumulative_unstake_amount
from ethereum.core.fact_transactions
where origin_function_signature = '0x990966d5'
and to_address = '0x759c6de5bca9ade8a1a2719a31553c4b7de02539'
and status = 'SUCCESS'
and block_timestamp::date >= current_date - 90
group by days
order by days
)
select
days,
s.cumulative_stake_amount as "Cumulative stake amount",
u.cumulative_unstake_amount as "Cumulative unstake amount"
from stake s
join unstake u using(days)
Run a query to Download Data