MoDeFi#Flow vs Other L1s Pt (II) 8
    Updated 2022-07-19
    with sol_users_first_months as
    (select *
    from(
    select *,
    row_number() over (partition by user order by date) as rank
    from(
    select distinct SIGNERS[0] as user, date_trunc('month', BLOCK_TIMESTAMP) as date
    from solana.core.fact_transactions
    order by SIGNERS[0], date))
    where rank<3),

    sol_users_txs_month as
    (select a.user, a.date as month_1, b.date as month_2,
    case
    when month_2 is null then 'No TXs'
    when timediff(month,month_1,month_2)=1 then 'TXs On 2nd Month'
    else 'TXs After 2nd Month'
    end as tag
    from sol_users_first_months a
    left join sol_users_first_months b
    on a.user=b.user and a.rank<b.rank
    )

    select tag, count(user) as users
    from sol_users_txs_month
    group by 1
    Run a query to Download Data