HitmonleeCryptoJUP Volume RTotals
Updated 2024-10-26
999
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
-- Filtered swaps data for relevant address and conditions
filtered_swaps AS (
SELECT
DATE_TRUNC('month', t2.hour) AS month,
(t2.swap_from_amount * p.price) AS swap_from_amount_usd,
t2.swapper,
t2.tx_id
FROM
(
SELECT
DATE_TRUNC('hour', block_timestamp) AS hour,
swap_from_amount,
swap_from_mint,
swapper,
tx_id
FROM
solana.defi.fact_swaps_jupiter_summary
WHERE
swapper = '{{Address}}'
OR swapper ILIKE 'DCA%'
OR swapper ILIKE 'j1%'
ORDER BY hour DESC
) t2
JOIN
(
SELECT
hour,
price,
token_address
FROM
solana.price.ez_prices_hourly
ORDER BY hour DESC
) p
ON
t2.hour = p.hour AND t2.swap_from_mint = p.token_address
QueryRunArchived: QueryRun has been archived