ArioDEX Season - top 10 swap token - volume (ethereum)
    Updated 2022-12-06
    with before as (
    SELECT
    'Before FTX Collapse' as status,
    concat(SYMBOL_IN, '→', SYMBOL_OUT) as Swap_pair,
    sum(AMOUNT_IN_USD) as Swap_Volume_USD
    from ethereum.core.ez_dex_swaps
    where AMOUNT_IN_USD is not NULL
    and AMOUNT_IN_USD > 0
    and SYMBOL_IN is not NULL
    and SYMBOL_IN != ' '
    and SYMBOL_OUT is not NULL
    and BLOCK_TIMESTAMP between '2022-11-01' and '2022-11-07'
    and EVENT_NAME = 'Swap'
    group by 1,2
    having Swap_Volume_USD < 1e21
    order by 3 desc
    limit 10
    ),
    After as (
    SELECT
    'After FTX Collapse' as status,
    concat(SYMBOL_IN, '→', SYMBOL_OUT) as Swap_pair,
    sum(AMOUNT_IN_USD) as Swap_Volume_USD
    from ethereum.core.ez_dex_swaps
    where AMOUNT_IN_USD is not NULL
    and AMOUNT_IN_USD > 0
    and SYMBOL_IN is not NULL
    and SYMBOL_IN != ' '
    and SYMBOL_OUT is not NULL
    and BLOCK_TIMESTAMP between '2022-11-08' and '2022-11-17'
    and EVENT_NAME = 'Swap'
    group by 1,2
    having Swap_Volume_USD < 1e21
    order by 3 desc
    limit 10
    Run a query to Download Data