saber-jlgen luna buy stats
    Updated 2023-01-24
    select
    case
    when block_timestamp >= '2023-01-07' and block_timestamp < '2023-01-14' then 'before announcement'
    when block_timestamp >= '2023-01-14' and block_timestamp <= '2023-01-20' then 'after announcement'
    end as time_frame,
    count(distinct tx_id) as buy_tx,
    count(distinct TRADER) as luna_buyer,
    sum(TO_AMOUNT/pow(10,6)) as luna_amount,
    luna_amount/luna_buyer as "purchase amount per user"
    from terra.core.ez_swaps
    where block_timestamp::date between '2023-01-07' and '2023-01-20'
    and TO_CURRENCY = 'uluna'
    and TX_SUCCEEDED = 'TRUE'
    group by 1
    Run a query to Download Data