alitaslimiOptimism DEXs Swaps Volume Daily
    Updated 2024-01-30
    with
    swaps as (
    select
    block_timestamp,
    tx_hash,
    case
    when amount_in_usd - amount_out_usd > 100 then amount_out_usd
    when amount_in_usd - amount_out_usd < -100 then amount_in_usd
    else (amount_in_usd + amount_out_usd) / 2
    end as amount_usd
    from
    optimism.defi.ez_dex_swaps
    )
    select
    block_timestamp::date as "Date",
    sum(amount_usd) as "Values"
    from
    swaps
    where
    block_timestamp::date >= (current_date - 10)
    and amount_usd > 0
    group by
    "Date"
    qualify
    "Date" < last_value("Date") over (order by "Date")
    order by
    "Date" desc
    Last run: about 1 year agoAuto-refreshes every 6 hours
    Date
    Values
    1
    2024-01-28 00:00:00.00027882418.495
    2
    2024-01-27 00:00:00.00022819906.515
    3
    2024-01-26 00:00:00.00040512401.59
    4
    2024-01-25 00:00:00.00049901147.035
    5
    2024-01-24 00:00:00.00035437033.155
    6
    2024-01-23 00:00:00.00018571586.34
    7
    2024-01-22 00:00:00.00052207880.64
    8
    2024-01-21 00:00:00.00019332237.7749998
    9
    2024-01-20 00:00:00.00024844903.63
    9
    370B
    3s