shadabformal-beige
    Updated 2024-11-02
    with base as (select
    withdrawer as user,
    min(block_timestamp) as first_tx
    from ethereum.maker.ez_withdrawals
    where tx_status = 'SUCCESS'
    group by 1

    union all

    select
    depositor as user,
    min(block_timestamp) as first_tx
    from ethereum.maker.ez_deposits
    where tx_status = 'SUCCESS'
    group by 1


    )

    select date_trunc('day', first_tx) as first_tx_date,
    count(distinct(user)) as count_new_withdrawer,
    sum(count_new_withdrawer) over (order by first_tx_date) as cumulative_count_new_withdrawer
    from base
    group by 1
    order by 1 desc
    QueryRunArchived: QueryRun has been archived