andurilDaily Active Swappers Solana
Updated 2022-10-04
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
›
⌄
select date_trunc(week,block_timestamp) as week,
'Stepn DEX' as swap_program,
count (distinct t.signers[0]) as daily_swapper_count,
count (distinct t.tx_id) as txs
from
solana.core.fact_transactions t
inner join solana.core.fact_events e
on e.tx_id = t.tx_id
where
date(t.block_timestamp) between '2022-06-01' and current_date()-1 and
e.succeeded = 'TRUE' and
e.program_id = 'Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j' and
log_messages::string like '%Program log: Instruction: Swap%'
group by date
union
select
date(block_timestamp) as date,
case when swap_program = 'jupiter aggregator v2' then 'Jupiter' when swap_program = 'orca' then 'Orca' when swap_program = 'raydium v4' then 'Raydium' else swap_program end as swap_program,
count(distinct swapper) daily_swapper_count
from solana.fact_swaps
where
date between '2022-06-01' and CURRENT_DATE()-1 and
succeeded = 'TRUE'
group by date,swap_program
Run a query to Download Data