SalehOPtimitic or Pessimistic?swaps
Updated 2022-10-18
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
›
⌄
with lst_arbitrum_sushi as (
select
count(DISTINCT tx_hash) as swaps
,count(DISTINCT ORIGIN_FROM_ADDRESS) as traders
,sum(amount_in_usd) as usd_amount
from arbitrum.sushi.ez_swaps
where event_name='Swap'
and amount_in_usd>0
)
,lst_polygon_sushi as (
select
count(DISTINCT tx_hash) as swaps
,count(DISTINCT ORIGIN_FROM_ADDRESS) as traders
,sum(amount_in_usd) as usd_amount
from polygon.sushi.ez_swaps
where event_name='Swap'
and amount_in_usd>0
)
,lst_optimism_sushi as (
select
count(DISTINCT tx_hash) as swaps
,count(DISTINCT ORIGIN_FROM_ADDRESS) as traders
,sum(amount_in_usd) as usd_amount
from optimism.sushi.ez_swaps
where amount_in_usd>0
)
select 'Arbitrum' as type ,* from lst_arbitrum_sushi
union all
select 'Polygon' as type ,* from lst_polygon_sushi
union all
select 'Optimism' as type ,* from lst_optimism_sushi
Run a query to Download Data