jackguySushiswap on Arbitrum 2
Updated 2022-08-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with tab1 as (
SELECT
symbol_out,
count(DISTINCT tx_hash) as swaps,
sum(amount_out_usd) as volume,
count(ORIGIN_FROM_ADDRESS) as users
FROM arbitrum.sushi.ez_swaps
WHERE NOT amount_out_usd is NULL
GROUP BY 1
ORDER BY 3 DESC
LIMIT 20
)
SELECT
date_trunc('day', block_timestamp) as day,
CASE WHEN symbol_out IN (SELECT symbol_out from tab1) THEN symbol_out ELSE 'other' END as swap_to_token ,
count(DISTINCT tx_hash) as swaps,
sum(amount_out_usd) as volume,
count(ORIGIN_FROM_ADDRESS) as users
FROM arbitrum.sushi.ez_swaps
WHERE NOT amount_out_usd is NULL
GROUP BY 1,2
Run a query to Download Data