datavortexdolphins
Updated 2025-01-24
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 dolphin_activity AS (
SELECT
swapper,
SUM(amount_in_usd) AS total_volume
FROM
sei.defi.ez_dex_swaps
GROUP BY
swapper
HAVING
SUM(amount_in_usd) BETWEEN 10000 AND 50000
),
top_trades_by_dolphins AS (
SELECT
da.swapper,
sa.symbol_in,
sa.symbol_out,
COUNT(DISTINCT sa.tx_id) AS swap_count,
SUM(sa.amount_in_usd) AS total_volume
FROM
dolphin_activity da
JOIN
sei.defi.ez_dex_swaps sa ON da.swapper = sa.swapper
WHERE
sa.symbol_in IS NOT NULL
AND sa.symbol_out IS NOT NULL
GROUP BY
da.swapper, sa.symbol_in, sa.symbol_out
HAVING
SUM(sa.amount_in_usd) IS NOT NULL
)
SELECT
swapper,
CONCAT(symbol_in, '->', symbol_out) AS swap_pair,
swap_count,
total_volume
FROM
QueryRunArchived: QueryRun has been archived