legionUntitled Query
Updated 2022-10-14
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
›
⌄
WITH tab1 as (
SELECT
'Arbitrum' as block_chain,
count(DISTINCT origin_from_address) as users,
sum (amount_in_usd) as volume,
count(DISTINCT tx_hash) as txs
from arbitrum.sushi.ez_swaps
WHERE block_timestamp > '2022-01-01'
GROUP BY 1
), tab2 as (
SELECT
'Optimism' as block_chain,
count(DISTINCT origin_from_address) as users,
sum (amount_in_usd) as volume,
count(DISTINCT tx_hash) as txs
from optimism.sushi.ez_swaps
WHERE block_timestamp > '2022-01-01'
GROUP BY 1
), tab3 as (
SELECT
'Polygon' as block_chain,
count(DISTINCT origin_from_address) as users,
sum (amount_in_usd) as volume,
count(DISTINCT tx_hash) as txs
FROM polygon.sushi.ez_swaps
WHERE block_timestamp > '2022-01-01'
GROUP BY 1
)
SELECT *
from tab1
UNION ALL
SELECT *
from tab2
UNION ALL
SELECT *
Run a query to Download Data