MLDZMNvelod1
Updated 2022-11-17Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
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