sarathflow user retention 8.7
    Updated 2022-12-20
    with w as(SELECT PROPOSER, count(distinct date_trunc('week', BLOCK_TIMESTAMP )) as weeks_active from flow.core.fact_transactions
    where date_trunc('week', BLOCK_TIMESTAMP ) > current_date -90 GROUP by 1),

    w_12 as (SELECT weeks_active, count(*) as counts from w group by 1 order by 1),
    ---------------------------------------------------------------------------------------------------------------------------------------
    s as (SELECT SIGNERS[0] as wallet, count(distinct date_trunc('week', BLOCK_TIMESTAMP )) as weeks_active from solana.core.fact_transactions
    where date_trunc('week', BLOCK_TIMESTAMP ) > current_date -90 GROUP by 1),

    s_12 as (SELECT weeks_active, count(*) as counts from s group by 1 order by 1),

    ------------------------------------------------------------------------------------------------------------------------------------
    e as (SELECT FROM_ADDRESS as wallet, count(distinct date_trunc('week', BLOCK_TIMESTAMP )) as weeks_active from ethereum.core.fact_transactions
    where date_trunc('week', BLOCK_TIMESTAMP ) > current_date -90 GROUP by 1),

    e_12 as (SELECT weeks_active, count(*) as counts from e group by 1 order by 1)

    -------------------------------------------------------------------------
    SELECT 'Flow' as chain, counts/(SELECT sum(counts) from w_12) as active_all_weeks from w_12 where weeks_active = 9
    UNION
    SELECT 'solana' as chain, counts/(SELECT sum(counts) from s_12) as active_all_weeks from s_12 where weeks_active = 9
    UNION
    SELECT 'Ethereum' as chain, counts/(SELECT sum(counts) from e_12) as active_all_weeks from e_12 where weeks_active = 9

    order by 1,2
    Run a query to Download Data