0-MIDswaps per time
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 tab1 as (
select date_trunc('minute',BLOCK_TIMESTAMP) as minute
,count(distinct SWAPPER) as swappers
,count(distinct TX_ID) as swaps
from solana.core.fact_swaps
where SWAP_PROGRAM in('orca token swap','ORCA Token Swap V2','orca whirlpool program')
and BLOCK_TIMESTAMP>='2023-07-01'
and SUCCEEDED='true'
group by 1),
tab2 as (
select date_trunc('hour',BLOCK_TIMESTAMP) as hour
,count(distinct SWAPPER) as swappers
,count(distinct TX_ID) as swaps
from solana.core.fact_swaps
where SWAP_PROGRAM in('orca token swap','ORCA Token Swap V2','orca whirlpool program')
and BLOCK_TIMESTAMP>='2023-07-01'
and SUCCEEDED='true'
group by 1),
tab3 as (
select date_trunc('day',BLOCK_TIMESTAMP) as day
,count(distinct SWAPPER) as swappers
,count(distinct TX_ID) as swaps
from solana.core.fact_swaps
where SWAP_PROGRAM in('orca token swap','ORCA Token Swap V2','orca whirlpool program')
and BLOCK_TIMESTAMP>='2023-07-01'
and SUCCEEDED='true'
group by 1)
select 'MINUTE' as time
,avg(swaps) as avg
,max(swaps) as max
,min(swaps) as min
,median(swaps) as med
from tab1
union all
select 'HOUR' as time
,avg(swaps) as avg
Run a query to Download Data