boomer77luna burn past 30 days
Updated 2022-02-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
with raw as (select date_trunc('day', block_timestamp) as dt, sum(offer_amount) as luna_burn
from terra.swaps
where offer_currency = 'LUNA' and block_timestamp >= CURRENT_DATE - 30 and tx_status = 'SUCCEEDED'
group by 1),
ust as (select date, sum(balance) as total
from terra.daily_balances
where currency = 'UST' and address not in ('terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8')
group by 1)
select a.dt, a.luna_burn, b.total as ust_supply
from raw a
left join ust b on a.dt = b.date
Run a query to Download Data