datavortexVolume Per Swap(Ethereum vs solana)
    Updated 2024-11-05

    WITH EthereumVolume AS (
    SELECT
    COUNT(tx_hash) AS transaction_count,
    SUM(amount_in_usd) AS total_volume
    FROM
    ethereum.defi.ez_dex_swaps
    WHERE
    block_timestamp BETWEEN '2024-01-01' AND '2024-10-31'
    ),
    SolanaVolume AS (
    SELECT
    COUNT(tx_id) AS transaction_count,
    SUM(swap_from_amount_usd) AS total_volume
    FROM
    solana.defi.ez_dex_swaps
    WHERE
    block_timestamp BETWEEN '2024-01-01' AND '2024-10-31'
    )

    SELECT
    'Ethereum' AS platform,
    total_volume / NULLIF(transaction_count, 0) AS volume_per_transaction
    FROM
    EthereumVolume
    UNION ALL
    SELECT
    'Solana' AS platform,
    total_volume / NULLIF(transaction_count, 0) AS volume_per_transaction
    FROM
    SolanaVolume;

    QueryRunArchived: QueryRun has been archived