DB_Net Staked Luna (7 days)
Updated 2023-03-06
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
›
⌄
with d as (
select
date_trunc('day', block_timestamp) as date,
sum(amount) as delegations
from terra.core.ez_staking
where action = 'Delegate' and date >= current_date - 6
group by 1
order by 1),
u as (
select
date_trunc('day', block_timestamp) as date,
sum(amount)*(-1)as undelegations
from terra.core.ez_staking
where action = 'Undelegate' and date >= current_date - 6
group by 1
order by 1
)
select
d.date,
d.delegations,
u.undelegations,
d.delegations + u.undelegations as net_delegations,
sum(net_delegations) over (order by d.date) as flow
from d left join u
where d.date = u.date
order by date
Run a query to Download Data