farid-c9j0VMsushi
Updated 2023-01-18Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
›
⌄
select 'Optimism' as type,
count (distinct tx_hash) as Swaps_Count,
count (distinct origin_from_address) as Swappers_Count,
sum (amount_in_usd) as Total_Swap_Volume,
avg (amount_in_usd) as Average_Swap_Volume,
median (amount_in_usd) as Median_Swap_Volume
from optimism.sushi.ez_swaps
where block_timestamp > CURRENT_DATE - 180 and block_timestamp<= CURRENT_DATE-1
union ALL
select 'Arbitrum' as type,
count (distinct tx_hash) as Swaps_Count,
count (distinct origin_from_address) as Swappers_Count,
sum (amount_in_usd) as Total_Swap_Volume,
avg (amount_in_usd) as Average_Swap_Volume,
median (amount_in_usd) as Median_Swap_Volume
from arbitrum.sushi.ez_swaps
where block_timestamp > CURRENT_DATE - 180 and block_timestamp<= CURRENT_DATE-1
union ALL
select 'Ethereum' as type,
count (distinct tx_hash) as Swaps_Count,
count (distinct origin_from_address) as Swappers_Count,
sum (amount_in_usd) as Total_Swap_Volume,
avg (amount_in_usd) as Average_Swap_Volume,
median (amount_in_usd) as Median_Swap_Volume
from ethereum.sushi.ez_swaps
where block_timestamp::date > CURRENT_DATE - 180 and block_timestamp::date<= CURRENT_DATE-1
Run a query to Download Data