Updated 2023-01-11
    with tab1 as (
    select
    min(block_timestamp) as min_date,
    TX_SENDER as wallet
    from terra.core.fact_transactions
    where block_timestamp between '2022-12-18' and '2023-01-03'
    group by 2),
    tab2 as (select
    date_trunc('day',block_timestamp) as date,
    trader
    from terra.core.ez_swaps
    where FROM_CURRENCY = 'uluna'
    and TX_SUCCEEDED = 'TRUE'
    and date between '2022-12-18' and '2023-01-03'
    and trader in (select wallet from tab1)
    group by 1,2)

    select
    count(distinct trader), count(distinct wallet)
    from tab1, tab2





    Run a query to Download Data