TOTAL_VOLUME_ALL_MONTHS | |
---|---|
1 |
smike-IwpkAMTotal Volume JUP
Updated 7 hours ago
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
›
⌄
-- forked from Total Volume @ https://flipsidecrypto.xyz/studio/queries/724d0f9c-6f24-4097-b630-5ebacf09a686
WITH -- Filtered swaps data for relevant address and conditions
filtered_swaps AS (
SELECT
(t2.swap_from_amount * p.price) AS swap_from_amount_usd
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}}'
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
),
-- Monthly trade volume
monthly_trade_volume AS (
SELECT
SUM(swap_from_amount_usd) AS total_volume
Last run: about 7 hours agoAuto-refreshes every 12 hours
1
8B
0s