saber-jldaily swap sol
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 buy as (
select
date_trunc('day',BLOCK_TIMESTAMP) as date,
count(distinct TX_ID) as buy_tx,
count(distinct SWAPPER) as buyer,
sum(SWAP_TO_AMOUNT) as buy_volume,
avg(SWAP_TO_AMOUNT) as avg_buy_volume
from solana.core.fact_swaps
where SWAP_TO_MINT = 'So11111111111111111111111111111111111111112'
and BLOCK_TIMESTAMP >= current_date - 60
group by 1
) ,
sale as (
select
date_trunc('day',BLOCK_TIMESTAMP) as date,
count(distinct TX_ID) as sell_tx,
count(distinct SWAPPER) as seller,
sum(SWAP_from_AMOUNT) as sell_volume,
avg(SWAP_from_AMOUNT) as avg_sell_volume
from solana.core.fact_swaps
where SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'
and BLOCK_TIMESTAMP >= current_date - 60
group by 1
)
select * , 'swap_to' as type from buy
union
select * , 'swap_from' as type from sale
Run a query to Download Data