sarathmerry_christms1
    Updated 2023-01-12
    with tab1 as (
    select
    from_address,
    min(block_timestamp) as min_date

    from optimism.core.fact_transactions
    group by 1
    )


    select
    date_trunc('day', min_date) as date1,
    case when date1 >= '2023-01-01' then '2023'
    else '2022'
    END as Year_to_date,
    count(*) as value

    from tab1
    where date1 > current_date - 30
    group by 1
    order by 1
    Run a query to Download Data