boomer77top 5 liq past 90 days
Updated 2021-10-06
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with liquidated_txns as (
select
distinct(tx_id) as tx_id,
msg_value,
date(block_timestamp) as dates
from terra.msgs
where substring(msg_value:execute_msg::string, 3, 20) = 'liquidate_collateral'
and tx_status = 'SUCCEEDED'
and date(block_timestamp) >= CURRENT_DATE() - 90
)
select
l.dates,
l.msg_value:execute_msg:liquidate_collateral:borrower as borrower,
m.msg_value:coins[0]:amount / POW(10, 6) as offer_amount_USD
from terra.msgs m
inner join liquidated_txns l
on l.tx_id = m.tx_id
where m.msg_value:execute_msg:submit_bid is not null
order by offer_amount_usd desc
limit 5;
Run a query to Download Data