ben-wyatterc20-and-native-token-transfers
    Updated 2025-02-03
    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 avalanche.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 avalanche.core.ez_native_transfers
    WHERE block_timestamp BETWEEN '2022-01-01' AND '2024-12-31'
    ) AS combined_transfers
    --where amount_usd < 1e9
    GROUP BY
    rounded_month,
    transaction_size
    ORDER BY
    rounded_month,
    transaction_size;
    QueryRunArchived: QueryRun has been archived