anomoneSolana Swaps - Orca vs Jupiter %
Updated 2022-05-03
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
›
⌄
WITH jupiter as (SELECT
date_trunc('day',BLOCK_TIMESTAMP ) as Day ,
'Jupiter' as SWAP_PROGRAM ,
--SWAP_TO_MINT,
SUM(SWAP_FROM_AMOUNT) as Swapped_SOL
FROM solana.swaps
WHERE SUCCEEDED = 'TRUE'
AND date(BLOCK_TIMESTAMP) >= '2020-01-01'
AND SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'
AND SWAP_TO_MINT <> 'So11111111111111111111111111111111111111112'
AND SWAP_PROGRAM = 'jupiter aggregator v2'
GROUP BY Day,SWAP_PROGRAM --, SWAP_TO_MINT
),
Orca as (SELECT
date_trunc('day',BLOCK_TIMESTAMP ) as Day ,
'Orca' as SWAP_PROGRAM ,
--SWAP_TO_MINT,
SUM(SWAP_FROM_AMOUNT) as Swapped_SOL
FROM solana.swaps
WHERE SUCCEEDED = 'TRUE'
AND date(BLOCK_TIMESTAMP) >= '2020-01-01'
AND SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'
AND SWAP_TO_MINT <> 'So11111111111111111111111111111111111111112'
AND SWAP_PROGRAM = 'orca'
GROUP BY Day, SWAP_PROGRAM--, SWAP_TO_MINT
)
SELECT * FROM Jupiter
UNION
SELECT * FROM Orca