saeedmznFlow vs Other L1s - user retention
    Updated 2022-06-21
    with flow_ret as (select
    payer,
    min(block_timestamp::date) as first_tx_date,
    max(block_timestamp::date) as last_tx_date,
    datediff('day', first_tx_date, last_tx_date) as retention_duration
    from flow.core.fact_transactions
    group by 1),

    eth_ret as (select
    from_address,
    min(block_timestamp::date) as first_tx_date,
    max(block_timestamp::date) as last_tx_date,
    datediff('day', first_tx_date, last_tx_date) as retention_duration
    from ethereum.core.fact_transactions
    group by 1),

    sol_ret as (select
    signers[0] as signer,
    min(block_timestamp::date) as first_tx_date,
    max(block_timestamp::date) as last_tx_date,
    datediff('day', first_tx_date, last_tx_date) as retention_duration
    from solana.core.fact_transactions
    group by 1),

    flow as (select case
    when retention_duration > 1 and retention_duration < 7 then 'one week retention'
    when retention_duration > 7 and retention_duration < 31 then 'one month retention'
    when retention_duration > 31 then 'more than one month retention'
    end as type,
    payer
    from flow_ret
    where type is not NULL
    ),

    eth as (select case
    when retention_duration > 1 and retention_duration < 7 then 'one week retention'
    Run a query to Download Data