binhachonSOL Swaps on Jupiter
Updated 2022-02-18
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
›
⌄
with sol_swap_transactions as (
select
block_timestamp::date as blocktime,
swap_from_amount,
0 as swap_to_amount
from solana.swaps
where block_timestamp::date >= '2022-01-01'
and swap_from_mint = 'So11111111111111111111111111111111111111112'
and swap_program ilike '%jupiter%'
union all
select
block_timestamp::date as blocktime,
0 as swap_from_amount,
swap_to_amount
from solana.swaps
where block_timestamp::date >= '2022-01-01'
and swap_to_mint = 'So11111111111111111111111111111111111111112'
and swap_program ilike '%jupiter%'
)
select
blocktime,
sum(swap_from_amount) as swap_from_volume,
sum(swap_to_amount) as swap_to_volume,
swap_from_volume - swap_to_volume as sol_added_to_liquidity_pools_daily,
sum(sol_added_to_liquidity_pools_daily) over (order by blocktime) as sol_added_to_liquidity_pools_total
from sol_swap_transactions
group by blocktime
order by blocktime desc
Run a query to Download Data