CATEGORY | SWAPS_SK_REG | REFUNDS_SK_REG | SUM_REFUNDS_SK_REG | SWAPS_SK_STREAM | REFUNDS_SK_STREAM | SUM_REFUNDS_SK_STREAM | |
---|---|---|---|---|---|---|---|
1 | a. 0 to 10 USD | 953 | 0 | 0 | 392 | 0 | 0 |
2 | b. 10 to 50 USD | 1196 | 0 | 0 | 1397 | 0 | 0 |
3 | c. 50 to 100 USD | 510 | 0 | 0 | 713 | 0 | 0 |
4 | d. 100 to 500 USD | 907 | 1 | 1 | 994 | 189 | 189 |
5 | e. 500 to 1000 USD | 604 | 0 | 1 | 838 | 131 | 320 |
6 | f. 1000 to 5000 USD | 665 | 0 | 1 | 889 | 103 | 423 |
7 | g. 5000 to 10000 USD | 120 | 0 | 1 | 27 | 0 | 423 |
8 | h. More than 10000 USD | 61 | 0 | 1 | 0 | 0 | 423 |
0x1A1F58A1Fd020BdE187baae3229e193275742a5erefunded txs by size Maya - Streaming separated
Updated 2025-03-26
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 all_swaps_grouped AS (
SELECT
s.tx_id,
MIN(s.block_timestamp) AS date_time,
AVG(s.from_amount_usd) AS swap_size,
CASE
WHEN AVG(s.from_amount_usd) > 0 AND AVG(s.from_amount_usd) <= 10 THEN 'a. 0 to 10 USD'
WHEN AVG(s.from_amount_usd) > 10 AND AVG(s.from_amount_usd) <= 50 THEN 'b. 10 to 50 USD'
WHEN AVG(s.from_amount_usd) > 50 AND AVG(s.from_amount_usd) <= 100 THEN 'c. 50 to 100 USD'
WHEN AVG(s.from_amount_usd) > 100 AND AVG(s.from_amount_usd) <= 500 THEN 'd. 100 to 500 USD'
WHEN AVG(s.from_amount_usd) > 500 AND AVG(s.from_amount_usd) <= 1000 THEN 'e. 500 to 1000 USD'
WHEN AVG(s.from_amount_usd) > 1000 AND AVG(s.from_amount_usd) <= 5000 THEN 'f. 1000 to 5000 USD'
WHEN AVG(s.from_amount_usd) > 5000 AND AVG(s.from_amount_usd) <= 10000 THEN 'g. 5000 to 10000 USD'
WHEN AVG(s.from_amount_usd) > 10000 THEN 'h. More than 10000 USD'
ELSE 'null'
END AS category
FROM maya.defi.fact_swaps AS s
WHERE s.block_timestamp BETWEEN '2024-01-01' AND '2025-02-20'
GROUP BY s.tx_id
),
filtered_swaps AS (
SELECT
tx_id,
CASE
WHEN SPLIT_PART(MEMO, ':', 5) ILIKE '_/%' OR
SPLIT_PART(MEMO, ':', 5) ILIKE '%/_' OR
SPLIT_PART(MEMO, ':', 5) ILIKE '%ts%' OR
SPLIT_PART(MEMO, ':', 5) = '_' OR
SPLIT_PART(MEMO, ':', 5) = 'ts' OR
SPLIT_PART(MEMO, ':', 5) = '_/ts'
THEN 'SwapKit'
ELSE NULL
END AS Affiliate_SK,
CASE
WHEN SPLIT_PART(MEMO, ':', 4) NOT LIKE '%/%' OR SPLIT_PART(MEMO, ':', 4) LIKE '%/1/0' THEN 'Regular Swap'
ELSE 'Streaming Swap'
Last run: 27 days ago
8
324B
25s