feyikemiSwaps categories
Updated 2025-01-23
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
›
⌄
WITH categorized_swappers AS (
SELECT
SWAPPER,
COUNT (DISTINCT TX_HASH) AS swaps
FROM aptos.defi.ez_dex_swaps
WHERE EVENT_ADDRESS = '0x48271d39d0b05bd6efca2278f22277d6fcc375504f9839fd73f74ace240861af'
GROUP BY SWAPPER
)
SELECT
CASE
WHEN swaps = 1 THEN '1 Swap'
WHEN swaps BETWEEN 2 AND 5 THEN '2 - 5 Swaps'
WHEN swaps BETWEEN 6 AND 10 THEN '6 - 10 Swaps'
WHEN swaps BETWEEN 11 AND 25 THEN '11 - 25 Swaps'
WHEN swaps BETWEEN 26 AND 50 THEN '26 - 50 Swaps'
WHEN swaps BETWEEN 51 AND 100 THEN '51 - 100 Swaps'
ELSE '> 100 Swaps'
END AS swappers_category,
COUNT(DISTINCT SWAPPER) AS swappers_count,
SUM(swaps) AS total_swaps
FROM categorized_swappers
GROUP BY 1
ORDER BY swappers_count DESC
QueryRunArchived: QueryRun has been archived