maybeyonassol_jup_orca_sol
Updated 2022-03-14
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
›
⌄
with
labels as (
select
address,
address_name
from solana.labels
),
jup as (
select
-- swap_from_mint,
'jupiter' as dex,
l1.address_name as sell_token,
-- swap_to_mint,
l2.address_name as buy_token,
l1.address_name || ' to ' || l2.address_name as swap_combo,
sum(swap_from_amount) as sol_sold,
count(distinct tx_id) as sell_transactions
from solana.swaps
inner join labels l1 on lower(l1.address) = lower(swap_from_mint)
inner join labels l2 on lower(l2.address) = lower(swap_to_mint)
where swap_to_amount > 0
and block_timestamp >= '2022-01-01'
and swap_program = 'jupiter aggregator v2'
and swap_from_mint != swap_to_mint
and (
swap_from_mint = 'So11111111111111111111111111111111111111112'
-- or
-- swap_to_mint = 'So11111111111111111111111111111111111111112'
)
group by 1,2,3,4
order by sol_sold desc
limit 5
),
orca as (
select
-- swap_from_mint,
Run a query to Download Data