MLDZMNvelod1
    Updated 2022-11-17
    SELECT
    date_trunc('day',block_timestamp) as date,
    case
    when block_timestamp>='2022-08-04' and block_timestamp<'2022-08-11' then 'week of attack'
    when block_timestamp>='2022-11-07' then 'Recent FTX crisis'
    else 'other days' end as gp,
    count(DISTINCT tx_hash) as no_swaps,
    count(DISTINCT origin_from_address) as wallets,
    sum(amount_in_usd) as volume,
    avg(amount_in_usd) as average_volume,
    sum(volume) over (order by date) as cumulative_volume,
    sum(wallets) over (order by date) as cumulative_swappers
    FROM optimism.velodrome.ez_swaps
    GROUP BY 1,2
    Run a query to Download Data