maybeyonasanchor_stats
Updated 2023-03-25
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
36
›
⌄
with borrows as (
select
block_id as block,
block_timestamp as time,
tx_id,
msg_value:sender::string as sender,
msg_value:execute_msg:borrow_stable:borrow_amount / POW(10,6) as amount,
'borrow' as event,
-msg_value:execute_msg:borrow_stable:borrow_amount / POW(10,6) as vector
from terra.msgs
where
msg_value:contract = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:execute_msg:borrow_stable is not null
and tx_status='SUCCEEDED'
),
repays as(
select
block_id as block,
block_timestamp as time,
tx_id,
msg_value:sender::string as sender,
msg_value:coins[0]:amount / POW(10,6) as amount,
'repay' as event,
msg_value:coins[0]:amount / POW(10,6) as vector
from terra.msgs
where
msg_value:contract = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:execute_msg like '%repay%'
and tx_status='SUCCEEDED'
),
events as(
select * from borrows
union all
select * from repays
),
updates as(
Run a query to Download Data