Afonso_DiazCopy of Untitled Query
Updated 2023-01-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
select
block_timestamp::date as day,
iff(block_timestamp::date >= '2023-01-14', 'After Announcement', 'Before Announcement') as timespan,
count(distinct tx_id) as stakes_count,
count(distinct delegator_address) as stakers_count,
count(distinct validator_address) as validators_count,
sum(amount) as volume,
sum(stakes_count) over (order by day) as cumulative_stakes_count,
sum(stakers_count) over (order by day) as cumulative_stakers_count,
sum(volume) over (order by day) as cumulative_volume
from terra.core.ez_staking
where block_timestamp between date('2023-01-14') - interval '1 week' and date('2023-01-14') + interval '1 week'
and tx_succeeded = 1
and action = '{{ action }}' --Delegate, Undelegate, Redelegate
group by 1, 2
order by 1, 2
Run a query to Download Data