alitaslimiStablecoins Swaps of SushiSwap
Updated 2022-06-08
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
dex,
token,
SUM(txn) AS txn,
ROUND(SUM(volume)) AS volume,
SUM(amount) AS amount,
AVG(price) AS price,
AVG(price_min) AS price_min,
AVG(price_max) AS price_max
FROM (
SELECT
platform AS dex,
symbol_in AS token,
COUNT(DISTINCT tx_hash) AS txn,
SUM(amount_in_usd) AS volume,
SUM(amount_in) AS amount,
AVG(amount_in_usd / amount_in) AS price,
MIN(amount_in_usd / amount_in) AS price_min,
MAX(amount_in_usd / amount_in) AS price_max
FROM
ethereum.core.ez_dex_swaps
WHERE
symbol_in IS NOT NULL AND amount_in_usd > 0
GROUP BY
platform,
token
UNION ALL
SELECT
platform AS dex,
symbol_out AS token,
COUNT(DISTINCT tx_hash) AS txn,
SUM(amount_out_usd) AS volume,
SUM(amount_out) AS amount,
AVG(amount_out_usd / amount_out) AS price,
MIN(amount_out_usd / amount_out) AS price_min,
MAX(amount_out_usd / amount_out) AS price_max
Run a query to Download Data