jp123 [FLOW] Flow vs L1s - Total Unique Users
    Updated 2022-06-01
    --Number of transactions -Transaction success rates -Number of unique wallets to make a transaction -Number of wallets that used the chain everyday since May 9th -Transaction fees

    SELECT 'Flow' as chain, min_date, COUNT(DISTINCT PROPOSER) as num_user, SUM(num_user) OVER (PARTITION BY chain ORDER BY min_date ASC) as total_users
    FROM (
    SELECT proposer, MIN(block_timestamp::date) as min_date
    FROM flow.core.fact_transactions
    GROUP BY 1
    )
    WHERE min_date > '2022-05-09'
    GROUP BY 1, 2

    UNION

    SELECT 'Solana' as chain, min_date, COUNT(DISTINCT address) as num_user, SUM(num_user) OVER (PARTITION BY chain ORDER BY min_date ASC) as total_users
    FROM (
    SELECT SIGNERS[0] as address, MIN(block_timestamp::date) as min_date
    FROM flipside_prod_db.solana.fact_transactions
    GROUP BY 1
    )
    WHERE min_date > '2022-05-09'
    GROUP BY 1, 2

    UNION

    SELECT 'Algorand' as chain, min_date, COUNT(DISTINCT SENDER) as num_user, SUM(num_user) OVER (PARTITION BY chain ORDER BY min_date ASC) as total_users
    FROM (
    SELECT SENDER, MIN(block_timestamp::date) as min_date
    FROM flipside_prod_db.algorand.transactions
    GROUP BY 1
    )
    WHERE min_date > '2022-05-09'
    GROUP BY 1, 2

    UNION

    SELECT 'Ethereum' as chain, min_date, COUNT(DISTINCT FROM_ADDRESS) as num_user, SUM(num_user) OVER (PARTITION BY chain ORDER BY min_date ASC) as total_users
    Run a query to Download Data