Penta Limited TeamWeekly Optimism 5.3
Updated 2024-12-09
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
›
⌄
WITH weekly_swap_stats AS (
SELECT
platform,
COUNT(DISTINCT TX_HASH) AS num_swap_transactions,
COUNT(DISTINCT SENDER) AS num_swap_users,
SUM(AMOUNT_OUT_USD) AS total_amount_swapped
FROM
optimism.defi.ez_dex_swaps
WHERE
BLOCK_TIMESTAMP >= current_date - INTERVAL '1 WEEK'
and date_trunc('week',block_timestamp) < date_trunc('week',current_date)
GROUP BY 1
)
SELECT
platform,
num_swap_transactions,
num_swap_users,
total_amount_swapped
FROM
weekly_swap_stats
ORDER BY
total_amount_swapped
QueryRunArchived: QueryRun has been archived