ZookSOL Swaps on Jupiter - January 1 to February 18, 2022
Updated 2022-02-19
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
›
⌄
with Sol_Swap_Volume_incoming as (
select
block_timestamp::date as date,
sum(swap_from_amount) as Swap_from_SOL_to_Other
From solana.swaps
Where block_timestamp::date >= '2022-01-01'
and block_timestamp::date < '2022-02-19'
and swap_from_mint = 'So11111111111111111111111111111111111111112' -- SOL token address -- Token being swapped from
and succeeded = 'TRUE'
--and swap_program = 'jupiter aggregator v2'
Group by date
Order by date desc)
,
Sol_Swap_Volume_outgoing as (
select
block_timestamp::date as date,
sum(swap_to_amount) as Swap_from_Other_to_SOL -- currency = SOL because I used swap_to_mint = 'SOL Address'
From solana.swaps
Where block_timestamp::date >= '2022-01-01'
and block_timestamp::date < '2022-02-19'
and swap_to_mint = 'So11111111111111111111111111111111111111112' -- SOL token address
and succeeded = 'TRUE'
and swap_program = 'jupiter aggregator v2' -- this filter is optional. Solana.swaps currently includes data from Jupiter only. So this filter is redundant and optional.
Group by date
Order by date desc)
Select
Sol_Swap_Volume_incoming.date,
Sol_Swap_Volume_incoming.Swap_from_SOL_to_Other,
Sol_Swap_Volume_outgoing.Swap_from_Other_to_SOL
from Sol_Swap_Volume_incoming left join Sol_Swap_Volume_outgoing
on Sol_Swap_Volume_incoming.date = Sol_Swap_Volume_outgoing.date
Run a query to Download Data