Updated 2024-12-31
    WITH BSC AS (select
    'bsc' as chain_id ,
    token_out as token
    from
    bsc.defi.ez_dex_swaps
    where block_timestamp >= CURRENT_TIMESTAMP - interval '30d'
    group by token_out),

    BASE AS (
    select
    'base' as chain_id ,
    token_out as token
    from
    bsc.defi.ez_dex_swaps
    where block_timestamp >= CURRENT_TIMESTAMP - interval '30d'
    group by token_out),

    Ethereum AS (
    select
    'ethereum' as chain_id ,
    token_out as token
    from
    ethereum.defi.ez_dex_swaps
    where block_timestamp >= CURRENT_TIMESTAMP - interval '90d'
    group by token_out),

    arbitrum AS (
    select
    'arbitrum' as chain_id ,
    token_out as token
    from
    arbitrum.defi.ez_dex_swaps
    where block_timestamp >= CURRENT_TIMESTAMP - interval '30d'
    group by token_out),

    avalanche AS (
    QueryRunArchived: QueryRun has been archived