zakkisyedToken Volumes in DEXs
    Updated 2023-04-23
    -- Trading volume comparison
    WITH meme_tokens_volume AS (
    SELECT
    SUM(amount_in_usd) AS total_meme_tokens_volume
    FROM ETHEREUM.core.ez_dex_swaps
    WHERE token_in IN (
    '0x6982508145454ce325ddbe47a25d4ec3d2311933',
    '0x6b89b97169a797d94f057f4a0b01e2ca303155e4',
    '0x5026f006b85729a8b14553fae6af249ad16c9aab',
    '0x2f573070e6090b3264fe707e2c9f201716f123c7'
    )
    AND block_timestamp > CURRENT_DATE - INTERVAL '7 days'
    ),
    non_meme_tokens_volume AS (
    SELECT
    SUM(amount_in_usd) AS total_non_meme_tokens_volume
    FROM ETHEREUM.core.ez_dex_swaps
    WHERE token_in NOT IN (
    '0x6982508145454ce325ddbe47a25d4ec3d2311933',
    '0x6b89b97169a797d94f057f4a0b01e2ca303155e4',
    '0x5026f006b85729a8b14553fae6af249ad16c9aab',
    '0x2f573070e6090b3264fe707e2c9f201716f123c7'
    )
    AND block_timestamp > CURRENT_DATE - INTERVAL '7 days'
    )
    SELECT
    total_meme_tokens_volume,
    total_non_meme_tokens_volume,
    total_meme_tokens_volume / (total_meme_tokens_volume + total_non_meme_tokens_volume) * 100 AS meme_tokens_percentage,
    total_non_meme_tokens_volume / (total_meme_tokens_volume + total_non_meme_tokens_volume) * 100 AS non_meme_tokens_percentage
    FROM meme_tokens_volume, non_meme_tokens_volume;

    Run a query to Download Data