boomer77Daily $LUNA burn
Updated 2021-11-24
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with raw as (select date_trunc('day', block_timestamp) as dt,
event_attributes:trader::string as traders,
sum(event_attributes:offer[0]:amount/1e6) as LUNA_burned,
sum(LUNA_burned) OVER(order by dt asc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as Total_LUNA_burned,
sum(event_attributes:swap_coin[0]:amount/1e6) as UST_minted,
sum(UST_minted) OVER(order by dt asc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as Total_UST_minted
from terra.msg_events
where event_type = 'swap' and block_timestamp >= CURRENT_DATE - 89
group by 1,2),
final as (select dt, traders, case
when traders = 'terra10kjnhhsgm4jfakr85673and3aw2y4a03598e0m' then 'Community_Pool'
else 'users' end as burner,
LUNA_burned, UST_minted
from raw)
select dt, burner, sum(LUNA_burned) as LUNA_burned, sum(ust_minted) as UST_minted
from final
group by 1,2
Run a query to Download Data