frankmaseonew wallets by chains
    Updated 2023-04-12
    -- forked from new wallets by chains @ https://flipsidecrypto.xyz/edit/queries/be7966bb-ad49-414d-a5ab-e4bbda8c9384

    -- metrics: new wallets, gas spend (7DMA), tx, new contracts created
    --New wallets
    WITH
    NEW_WALLETS AS (
    SELECT
    'ARBITRUM' as chain, FROM_ADDRESS AS WALLET, MIN(BLOCK_TIMESTAMP) as FIRST_SEEN_TS
    FROM arbitrum.core.fact_transactions
    GROUP BY 1,2
    UNION ALL

    SELECT
    'AVALANCHE' as chain, FROM_ADDRESS AS WALLET, MIN(BLOCK_TIMESTAMP) as FIRST_SEEN_TS
    FROM avalanche.core.fact_transactions
    GROUP BY 1,2

    UNION ALL
    SELECT
    'BSC' as chain, FROM_ADDRESS AS WALLET, MIN(BLOCK_TIMESTAMP) as FIRST_SEEN_TS
    FROM bsc.core.fact_transactions
    GROUP BY 1,2

    UNION ALL
    SELECT
    'ETHEREUM' as chain, FROM_ADDRESS AS WALLET, MIN(BLOCK_TIMESTAMP) as FIRST_SEEN_TS
    FROM ethereum.core.fact_transactions
    GROUP BY 1,2

    UNION ALL
    SELECT
    'GNOSIS' as chain, FROM_ADDRESS AS WALLET, MIN(BLOCK_TIMESTAMP) as FIRST_SEEN_TS
    FROM gnosis.core.fact_transactions
    GROUP BY 1,2

    UNION ALL
    Run a query to Download Data