ben-wyattethereum copy
    Updated 2025-02-03
    -- forked from ethereum @ https://flipsidecrypto.xyz/studio/queries/6ed3c699-c3a5-46f9-ab50-53181a3e1e66

    -- forked from unit-query @ https://flipsidecrypto.xyz/studio/queries/54460826-0a26-461a-b81d-22a6d8da4cb8

    --this combines the ez_native_transfer and the ez_token_transfer tables together
    --grabs the amount_usd values and does a little bit of by-row analysis


    SELECT
    DATE_TRUNC('month', block_timestamp) AS rounded_month,
    COUNT(DISTINCT from_address) AS unique_users,
    SUM(amount_usd) AS tx_vol_usd,
    COUNT(*) AS tx_count,
    CASE
    WHEN amount_usd > 100000 THEN 'Large'
    ELSE 'Small'
    END AS transaction_size
    FROM (
    -- SELECT
    -- block_timestamp,
    -- from_address,
    -- amount_usd
    -- FROM ethereum.core.ez_token_transfers
    -- WHERE block_timestamp BETWEEN '2022-01-01' AND '2024-12-31'
    -- UNION ALL
    SELECT
    block_timestamp,
    from_address,
    amount_usd,
    FROM ethereum.core.ez_native_transfers
    WHERE block_timestamp BETWEEN '2022-01-01' AND '2024-12-31'
    ) AS combined_transfers
    where amount_usd < 1e9
    GROUP BY
    QueryRunArchived: QueryRun has been archived