No Data to Display
gigiokobapleased-aquamarine
Updated 2025-02-08
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 target_swaps AS (
SELECT
TX_HASH,
BLOCK_TIMESTAMP,
CASE
WHEN LOWER(ORIGIN_FROM_ADDRESS) = LOWER('0xEa34479f7d95341E5fd49b89936366D6da710824')
THEN 'Sold'
WHEN LOWER(ORIGIN_TO_ADDRESS) = LOWER('0xEa34479f7d95341E5fd49b89936366D6da710824')
THEN 'Bought'
END AS direction,
TO_NUMBER(decoded_log:"value") AS target_value
FROM swell.core.ez_decoded_event_logs
WHERE EVENT_NAME = 'swap'
AND (
LOWER(ORIGIN_FROM_ADDRESS) = LOWER('0xEa34479f7d95341E5fd49b89936366D6da710824')
OR LOWER(ORIGIN_TO_ADDRESS) = LOWER('0xEa34479f7d95341E5fd49b89936366D6da710824')
)
),
other_swaps AS (
SELECT
TX_HASH,
CONTRACT_ADDRESS,
TO_NUMBER(decoded_log:"value") AS other_value
FROM swell.core.ez_decoded_event_logs
WHERE EVENT_NAME = 'swap'
AND LOWER(CONTRACT_ADDRESS) <> LOWER('0xEa34479f7d95341E5fd49b89936366D6da710824')
)
SELECT
s.direction,
o.CONTRACT_ADDRESS AS swapped_for_token,
COUNT(DISTINCT s.TX_HASH) AS swap_occurrences,
SUM(s.target_value) AS total_target_volume,
SUM(o.other_value) AS total_counter_volume,
MIN(s.BLOCK_TIMESTAMP) AS first_swap,
MAX(s.BLOCK_TIMESTAMP) AS last_swap
FROM target_swaps s
Last run: about 1 month ago
0
2B
2s