mlhTotal count of pools on Uni & Sushi for each L2 chain
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
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
SELECT
'arbitrum' as type,
case WHEN project_name LIKE '%sushiswap%' THEN 'SushiSwap'
WHEN project_name LIKE '%uniswap%' THEN 'UniSwap' end as dex,
count(DISTINCT tx_hash) as swaps,
count(DISTINCT origin_from_address) as users,
count(DISTINCT origin_to_address) as pools
FROM arbitrum.core.fact_event_logs
LEFT outer JOIN arbitrum.core.dim_labels
ON contract_address = address
where not address is NULL
AND( project_name LIKE '%sushiswap%'
OR project_name LIKE '%uniswap%' )
GROUP BY 2
UNION
SELECT
'optimism' as type,
case WHEN project_name LIKE '%sushiswap%' THEN 'SushiSwap'
WHEN project_name LIKE '%uniswap%' THEN 'UniSwap' end as dex,
count(DISTINCT tx_hash) as swaps,
count(DISTINCT origin_from_address) as users,
count(DISTINCT origin_to_address) as pools
FROM optimism.core.fact_event_logs
LEFT outer JOIN optimism.core.dim_labels
ON contract_address = address
where not address is NULL
AND( project_name LIKE '%sushiswap%'
OR project_name LIKE '%uniswap%' )
GROUP BY 2
UNION
SELECT
'polygon' as type,
Run a query to Download Data