FrodoNumber of Users Based on Number of Active Days
    Updated 2024-03-12
    with all_days as
    (select
    count(distinct block_timestamp::date) as total_network_days
    from aurora.core.fact_transactions),

    user_active_days as
    (select
    FROM_ADDRESS as user,
    count(distinct block_timestamp::date) as active_days_count,
    count(distinct tx_hash) as txs_count
    from aurora.core.fact_transactions
    group by 1
    order by 2 desc),

    user_status as
    (select
    user,
    active_days_count,
    (active_days_count/total_network_days * 100) as percent_of_all_day,
    txs_count
    from user_active_days , all_days
    order by 3 desc )

    select
    active_days_count,
    count(distinct user) as users_count
    from user_status
    group by 1
    QueryRunArchived: QueryRun has been archived