TOTAL_SWAPPERS_LAST_60_DAYS | ACTIVE_USERS_LAST_60_DAYS | AVG_SWAPS_PER_USER_LAST_60_DAYS | TOTAL_SWAPS_LAST_60_DAYS | |
---|---|---|---|---|
1 | 20963 | 2908 | 29.205743 | 612240 |
crypto_gostTotal swaps volume
Updated 2024-12-28
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
›
⌄
WITH swap_events AS (
SELECT
block_timestamp,
tx_hash,
ORIGIN_FROM_ADDRESS AS user_address,
nvl(amount_in_usd, amount_out_usd) AS amount_usd
FROM avalanche.defi.ez_dex_swaps
where platform ilike '%pharaoh%'
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