MostlyData_Daily DEX Volume
    Updated 2025-01-20
    with dex_tvl as(
    select
    date as dt,
    chain,
    --category,
    --protocol,
    sum(chain_tvl) as daily_tvl

    from external.defillama.fact_protocol_tvl

    where
    (
    chain = 'Solana'
    or chain = 'Ethereum'
    or chain = 'Avalanche'
    or chain = 'Arbitrum'
    or chain = 'Optimism'
    or chain = 'Near'
    or chain = 'Aptos'
    )
    and date >= current_date() - interval '30 days'
    and date < current_date()
    and category = 'Dexes'

    group by 1,2

    )

    ,dex_volume as(
    select
    date as dt,
    case
    when chain = 'solana' then 'Solana'
    when chain = 'ethereum' then 'Ethereum'
    when chain = 'avalanche' then 'Avalanche'
    when chain = 'arbitrum' then 'Arbitrum'
    Last run: 3 months ago
    DT
    CHAIN
    DEXs TVL per Traded Volume [USD]
    1
    2025-01-13 00:00:00.000Aptos10.244524
    2
    2025-01-13 00:00:00.000Arbitrum2.332872
    3
    2025-01-14 00:00:00.000Ethereum2.562419
    4
    2025-01-13 00:00:00.000Near17.302038
    5
    2025-01-14 00:00:00.000Near17.007564
    6
    2025-01-16 00:00:00.000Optimism1.390873
    7
    2025-01-16 00:00:00.000Solana0.812988
    8
    2025-01-13 00:00:00.000Solana0.890996
    9
    2025-01-18 00:00:00.000Arbitrum0.845267
    10
    2025-01-17 00:00:00.000Ethereum3.770856
    11
    2025-01-18 00:00:00.000Aptos6.852013
    12
    2025-01-18 00:00:00.000Ethereum3.07543
    13
    2025-01-17 00:00:00.000Solana0.808077
    14
    2025-01-14 00:00:00.000Aptos7.422885
    15
    2025-01-14 00:00:00.000Solana0.65605
    16
    2025-01-15 00:00:00.000Aptos7.812432
    17
    2025-01-15 00:00:00.000Arbitrum0.972817
    18
    2025-01-14 00:00:00.000Arbitrum0.60134
    19
    2025-01-15 00:00:00.000Solana0.8615
    20
    2025-01-16 00:00:00.000Near8.67126
    42
    2KB
    2s