KARTODUnique Addresses, Txs on EVM blockchains
    Updated 2023-09-16

    SELECT
    date_trunc('day', BLOCK_TIMESTAMP) AS time_,
    'Ethereum' AS chain,
    COUNT(distinct TX_HASH) AS txs,
    COUNT(distinct FROM_ADDRESS) AS from_address
    FROM ethereum.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day',CURRENT_DATE()) - interval '90 days'
    AND BLOCK_TIMESTAMP < DATE_TRUNC('day',CURRENT_DATE())
    GROUP BY 1

    UNION ALL

    SELECT
    date_trunc('day', BLOCK_TIMESTAMP) AS time_,
    'BSC' AS chain,
    COUNT(distinct TX_HASH) AS txs,
    COUNT(distinct FROM_ADDRESS) AS from_address
    FROM bsc.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day',CURRENT_DATE()) - interval '90 days'
    AND BLOCK_TIMESTAMP < DATE_TRUNC('day',CURRENT_DATE())
    GROUP BY 1

    UNION ALL

    SELECT
    date_trunc('day', BLOCK_TIMESTAMP) AS time_,
    'Arbitrum' AS chain,
    COUNT(distinct TX_HASH) AS txs,
    COUNT(distinct FROM_ADDRESS) AS from_address
    FROM arbitrum.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day',CURRENT_DATE()) - interval '90 days'
    AND BLOCK_TIMESTAMP < DATE_TRUNC('day',CURRENT_DATE())
    GROUP BY 1

    UNION ALL
    Run a query to Download Data