ArioFlow - New Users Over time
    Updated 2025-01-07
    with first_activity as (
    select
    PROPOSER,
    min(BLOCK_TIMESTAMP) as MIN_Date
    from flow.core.fact_transactions
    where TX_SUCCEEDED = TRUE
    group by 1
    )
    select
    date_trunc(month, block_timestamp) as date
    , iff(date_trunc(month, MIN_Date) = date_trunc(month, block_timestamp), 'New User', 'Returning User') as category
    , count(distinct PROPOSER) as users
    from flow.core.fact_transactions
    left join first_activity
    using(PROPOSER)
    where TX_SUCCEEDED = TRUE
    group by 1,2
    QueryRunArchived: QueryRun has been archived