saeedmznFlow vs Other L1s - avg time
    Updated 2022-07-18
    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),
    all_ as (
    select 'Flow' as blockchain, avg(retention_duration) as avg_duration from flow_ret where retention_duration > 0
    union
    select 'Ethereum' as blockchain, avg(retention_duration) as avg_duration from eth_ret where retention_duration > 0
    union
    select 'Solana' as blockchain, avg(retention_duration) as avg_duration from sol_ret where retention_duration > 0
    )
    select * from all_


    Run a query to Download Data