boomer77UST holder
Updated 2021-09-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with krt as (select address, balance as KRT
from terra.daily_balances
where currency = 'KRT' and date = CURRENT_DATE - 1 and balance > 0
group by 1,2
order by balance desc
limit 10),
luna as (select address, sum(balance) as staked_luna
from terra.daily_balances
where currency = 'LUNA' and date = CURRENT_DATE - 1 and balance_type = 'liq'
group by 1),
ust as (select address, balance as ust
from terra.daily_balances
where currency = 'UST' and date = CURRENT_DATE - 1)
select a.address, a.KRT, b.staked_luna, case when c.ust is null then '0' else c.ust end as UST
from krt a
join luna b on a.address = b.address
left join ust c on a.address = c.address
order by 2 desc
Run a query to Download Data