0xHaM-dNew Users
    Updated 2023-01-26
    with table1 as (
    select
    trader,
    min(block_timestamp) as Mindate
    from osmosis.core.fact_swaps
    where from_currency = 'ibc/0954E1C28EB7AF5B72D24F3BC2B47BBB2FDF91BDDFD57B74B99E133AED40972A'
    and TX_SUCCEEDED = TRUE
    group by 1),

    table2 as (
    select trader,
    min (block_timestamp) as Mindate
    from osmosis.core.fact_swaps
    where to_currency = 'ibc/0954E1C28EB7AF5B72D24F3BC2B47BBB2FDF91BDDFD57B74B99E133AED40972A'
    and TX_SUCCEEDED = TRUE
    group by 1)

    select
    'Swap From SCRT' as swap_type,
    mindate::date as date,
    count (distinct trader) as New_Users,
    sum (new_users) over (order by date) as Total_Users
    from table1
    group by 1,2

    union ALL

    select 'Swap to SCRT' as swap_type,
    mindate::date as date,
    count (distinct trader) as New_Users,
    sum (new_users) over (order by date) as Total_Users
    from table2
    group by 1,2
    Run a query to Download Data