shreyash-5873Anchor Total Deposits
Updated 2021-08-18
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
›
⌄
with daily_stable_deposits as (
select
block_id,
sum(m.msg_value:coins[0]:amount) / pow(10, 6) as total_stable_deposits
from terra.msgs m
where m.msg_value:execute_msg:deposit_stable is not null
and tx_status = 'SUCCEEDED'
group by 1
),
daily_stable_withdrawals as (
select
block_id,
sum(m.msg_value:execute_msg:send:amount) / pow(10, 6) as total_stable_withdrawals
from terra.msgs m
where m.msg_value:execute_msg:send:msg:redeem_stable is not null
and tx_status = 'SUCCEEDED'
group by 1
),
daily_deposits as (
select
d.block_id,
total_stable_deposits,
total_stable_withdrawals
from daily_stable_deposits d
full outer join daily_stable_withdrawals w
on d.block_id = w.block_id
)
select * from daily_deposits
order by block_id
Run a query to Download Data