tongzzezVelo from
Updated 2022-10-26
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
33
34
›
⌄
with all_dex as (
select 'Sushiswap' as dex,
symbol_in,
count (distinct tx_hash) as tx,
count (distinct origin_from_address) as swappers
from optimism.sushi.ez_swaps
where block_timestamp >= CURRENT_DATE - 30
and block_timestamp < CURRENT_DATE
group by 1,2
union ALL
select 'Velodrome' as dex,
symbol_in,
count (distinct tx_hash) as tx,
count (distinct origin_from_address) as swappers
from optimism.velodrome.ez_swaps
where block_timestamp >= CURRENT_DATE - 30
and block_timestamp < CURRENT_DATE
group by 1,2
)
select symbol_in,
tx,
swappers,
row_number() over(order by tx desc) as ranks,
case when ranks = '10' then '10'
else concat(' ', ranks)
end as rank,
concat(rank,'.', symbol_in) as orders
from all_dex
where dex = 'Velodrome'
order by 2 DESC
limit 10
Run a query to Download Data