Specterplatform tx trend
Updated 2025-02-25Copy 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
›
⌄
WITH savax_swaps AS (
SELECT
Block_timestamp,
tx_hash,
sender,
platform,
amount_in_usd,
amount_out_usd
FROM avalanche.defi.ez_dex_swaps
WHERE (symbol_in = 'sAVAX' OR symbol_out = 'sAVAX')
),
top_10_platforms AS (
SELECT
platform,
SUM(amount_in_usd) AS total_volume_usd
FROM savax_swaps
GROUP BY platform
ORDER BY total_volume_usd DESC
LIMIT 10
)
SELECT
DATE_TRUNC('month', Block_timestamp) AS date,
m.platform,
COUNT(DISTINCT m.tx_hash) AS swap_count,
SUM(m.amount_in_usd) AS total_volume_usd
FROM savax_swaps m
JOIN top_10_platforms t ON m.platform = t.platform
GROUP BY date, m.platform
ORDER BY date DESC;
QueryRunArchived: QueryRun has been archived