bachibin5
    Updated 2022-11-02
    select
    date_trunc('hour', block_timestamp) as hour,
    case when block_timestamp >= '2022-10-28' then 'After $OSMO listed on Binance exchange'
    when block_timestamp < '2022-10-28' then 'Before $OSMO listed on Binance exchange'
    end as time_period,
    count(distinct trader) as no_of_swappers,
    round(sum (case when from_currency = 'uosmo' then (from_amount/pow(10,from_decimal)) when to_currency = 'uosmo'
    then (to_amount/pow(10,to_decimal)) end),2) as tot_volume,
    round(avg (case when from_currency = 'uosmo' then (from_amount/pow(10,from_decimal)) when to_currency = 'uosmo'
    then (to_amount/pow(10,to_decimal)) end),2) as avg_volume
    from osmosis.core.fact_swaps
    where tx_status = 'SUCCEEDED'
    and block_timestamp >= '2022-10-20'
    and (from_currency = 'uosmo' or to_currency = 'uosmo')
    group by 1,2
    Run a query to Download Data