0-MIDnew users
    Updated 2023-01-04
    with tab1 as (
    select min(BLOCK_TIMESTAMP::date) as date,trader as unique_swappers_from_akt
    from osmosis.core.fact_swaps
    where FROM_CURRENCY='ibc/1480B8FD20AD5FCAE81EA87584D269547DD4D436843C1D20F15E00EB64743EF4'
    --and date>=current_date-7
    and TX_STATUS='SUCCEEDED'
    group by 2),
    tab2 as (
    select min(BLOCK_TIMESTAMP::date) as date,trader as unique_swappers_to_akt
    from osmosis.core.fact_swaps
    where TO_CURRENCY='ibc/1480B8FD20AD5FCAE81EA87584D269547DD4D436843C1D20F15E00EB64743EF4'
    --and date>=current_date-7
    and TX_STATUS='SUCCEEDED'
    group by 2)
    select tab2.date,count(unique_swappers_from_akt)+count(unique_swappers_to_akt) as new_swappers
    ,sum(new_swappers)over (order by tab2.date asc)as cumulative_new_swappers
    from tab1
    full outer join tab2
    on tab1.date=tab2.date
    group by 1


    Run a query to Download Data