TOTAL_SWAPPERS_LAST_60_DAYS | ACTIVE_USERS_LAST_60_DAYS | AVG_SWAPS_PER_USER_LAST_60_DAYS | TOTAL_SWAPS_LAST_60_DAYS | |
---|---|---|---|---|
1 | 38417 | 13430 | 71.6715 | 2753404 |
crypto_gostSwappers Count on Thala
Updated 2024-12-31
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
›
⌄
WITH swap_events AS (
SELECT
block_timestamp,
tx_hash,
swapper AS user_address,
nvl(amount_in_usd, amount_out_usd) AS amount_usd
FROM aptos.defi.ez_dex_swaps
WHERE event_address = '0x48271d39d0b05bd6efca2278f22277d6fcc375504f9839fd73f74ace240861af'
AND block_timestamp >= current_date - INTERVAL '60 days'
),
user_swap_counts AS (
SELECT
user_address,
COUNT(*) AS swap_count
FROM
swap_events
GROUP BY
user_address
)
SELECT
(SELECT COUNT(DISTINCT user_address) FROM swap_events) AS total_swappers_last_60_days,
COUNT(DISTINCT CASE WHEN swap_count > 5 THEN user_address END) AS active_users_last_60_days,
AVG(swap_count) AS avg_swaps_per_user_last_60_days,
SUM(swap_count) AS total_swaps_last_60_days
FROM
user_swap_counts;
Last run: about 2 months ago
1
31B
2s