WEEK_A | USD_VOLUME_A | TX_COUNT_A | WALLET_COUNT_A | WEEK_B | USD_VOLUME_B | TX_COUNT_B | WALLET_COUNT_B | VOLUME_DIFF | PERCENTAGE_DIFF | |
---|---|---|---|---|---|---|---|---|---|---|
1 | 2025-02-17 00:00:00.000 | 10958571.41 | 90820 | 9749 | 2025-02-10 00:00:00.000 | 9402919.9 | 83702 | 9287 | 1555651.51 | 16.544345018 |
i_danWeekly Stats 2 copy
Updated 2025-02-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 new_wallets as (
SELECT
MIN(block_timestamp) as create_date
, origin_from_address
FROM kaia.defi.ez_dex_swaps
GROUP BY 2
),
last_week as (
SELECT
date_trunc('week', block_timestamp) as week_a
, SUM(CASE WHEN amount_in_usd IS NULL THEN amount_out_usd ELSE amount_in_usd END) as usd_volume_a
, COUNT(DISTINCT(tx_hash)) as tx_count_a
, COUNT(DISTINCT(origin_from_address)) as wallet_count_a
FROM kaia.defi.ez_dex_swaps
WHERE block_timestamp < date_trunc('week', current_date)
GROUP BY 1
ORDER BY 1 desc
),
previous_week as (
SELECT
date_trunc('week', block_timestamp) as week_b
, SUM(CASE WHEN amount_in_usd IS NULL THEN amount_out_usd ELSE amount_in_usd END) as usd_volume_b
, COUNT(DISTINCT(tx_hash)) as tx_count_b
, COUNT(DISTINCT(origin_from_address)) as wallet_count_b
FROM kaia.defi.ez_dex_swaps
WHERE block_timestamp < date_trunc('week', current_date)
GROUP BY 1
ORDER BY 1 desc
LIMIT 2
),
table_1 as (
SELECT *
FROM last_week
Last run: about 1 month ago
1
123B
4s