hyoeisemanSN 2
Updated 2022-10-15Copy 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
›
⌄
with tab1 as (select 'Arbitrum' as type, block_timestamp::date as date,
count (distinct tx_hash) as number_of_transactions,
count (distinct origin_from_address) as number_of_swappers,
number_of_transactions/number_of_swappers as avg_txn_per_swapper,
sum (amount_in_usd) as swap_amount,
swap_amount/number_of_swappers as amount_swapped_per_user
from arbitrum.sushi.ez_swaps group by 1,2),
tab2 as (select 'Optimism' as type,block_timestamp::date as date,
count (distinct tx_hash) as number_of_transactions,
count (distinct origin_from_address) as number_of_swappers,
number_of_transactions/number_of_swappers as avg_txn_per_swapper,
sum (amount_in_usd) as swap_amount,
swap_amount/number_of_swappers as amount_swapped_per_user
from optimism.sushi.ez_swaps group by 1,2),
tab3 as (select 'Polygon' as type, block_timestamp::date as date,
count (distinct tx_hash) as number_of_transactions,
count (distinct origin_from_address) as number_of_swappers,
number_of_transactions/number_of_swappers as avg_txn_per_swapper,
sum (amount_in_usd) as swap_amount,
swap_amount/number_of_swappers as amount_swapped_per_user
from polygon.sushi.ez_swaps group by 1,2)
select * from tab1 union ALL
select * from tab2 union ALL
select * from tab3
Run a query to Download Data