JhanlycnUser Retention by Day Frequency
    Updated 2025-01-16
    select
    case
    when day_count between 0 and 5 then '0-5'
    when day_count between 6 and 24 then '6-24'
    when day_count between 25 and 49 then '25-49'
    when day_count between 50 and 99 then '50-99'
    else '100+'
    end as day_range,
    count(*) as swapper_count
    from
    (
    select
    swapper,
    count(distinct block_timestamp::date) as day_count
    from
    solana.defi.fact_swaps
    where
    succeeded
    and program_id in (
    'JUP6i4ozu5ydDCnLiMogSckDPpbtr7BJ4FtzYWkb5Rk',
    'JUP2jxvXaqu7NQY1GmNF4m1vodw12LVXYxbFL2uJvfo',
    'JUP3c2Uh3WA4Ng34tw6kPd2G4C5BB21Xo36Je1s32Ph',
    'JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB'
    )
    group by
    swapper
    ) as swapper_day_counts
    group by
    case
    when day_count between 0 and 5 then '0-5'
    when day_count between 6 and 24 then '6-24'
    when day_count between 25 and 49 then '25-49'
    when day_count between 50 and 99 then '50-99'
    else '100+'
    end
    order by
    QueryRunArchived: QueryRun has been archived