Sandeshuser retention
    Updated 9 days ago
    with ronin_chain as
    (
    with temp as
    (
    select from_address, min(date_trunc('week',block_timestamp)) as joined, max(date_trunc('week',block_timestamp)) as exited, count(distinct date_trunc('week',block_timestamp)) as weeks_active
    from ronin.core.fact_transactions
    where 1=1
    and from_address in ( select from_address from ronin.core.fact_transactions where block_timestamp>='2024-12-01' and nonce=0)
    group by from_address
    )
    select weeks_active, count(from_address) as users, sum(users) over (order by weeks_active asc) as total_users, 100*users/total_users as retention_ratio
    from temp
    group by weeks_active

    ),
    base_chain as
    (
    with temp as
    (
    select from_address, min(date_trunc('week',block_timestamp)) as joined, max(date_trunc('week',block_timestamp)) as exited, count(distinct date_trunc('week',block_timestamp)) as weeks_active
    from base.core.fact_transactions
    where 1=1
    and from_address in ( select from_address from base.core.fact_transactions where block_timestamp>='2024-12-01' and nonce=0)
    group by from_address
    )
    select weeks_active, count(from_address) as users, sum(users) over (order by weeks_active asc) as total_users, 100*users/total_users as retention_ratio
    from temp
    group by weeks_active

    ),
    ethereum_chain as
    (
    with temp as
    (
    select from_address, min(date_trunc('week',block_timestamp)) as joined, max(date_trunc('week',block_timestamp)) as exited, count(distinct date_trunc('week',block_timestamp)) as weeks_active
    from ethereum.core.fact_transactions
    Last run: 9 days ago
    TIME
    WEEKS_ACTIVE
    RONIN_RETENTION
    BASE_RETENTION
    ETH_RETENTION
    1
    1 month40.055421230.005675850.01718783
    2
    2 month80.012017060.000613850.0016889
    3
    3 month120.005938230.000153530.00025241
    4
    1 week1111
    4
    161B
    339s