boomer77luna burned and ust mint
    Updated 2021-12-07
    with swap_volume as (select date_trunc('day', block_timestamp) as dt,
    trader, case
    when trader = 'terra10kjnhhsgm4jfakr85673and3aw2y4a03598e0m' then 'Comm Pool'
    else 'traders' end as who,
    sum(offer_amount) as LUNA_burned,
    sum(token_1_amount_usd) as UST_minted
    from terra.swaps
    where swap_pair = 'LUNA to UST'
    and block_timestamp > '2021-09-09'
    and tx_status = 'SUCCEEDED'
    group by 1,2)

    select dt, who, sum(LUNA_burned) as LUNA_burned, sum(UST_minted) as UST_minted
    from swap_volume
    group by 1,2
    Run a query to Download Data