marquSol Perps - [all] txs
Updated 2024-05-08
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
activity as (
select
block_timestamp,
tx_id,
signers[0] as wallet_address,
case
when program_id = 'ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD' then 'Zeta Markets'
when program_id = 'dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH' then 'Drift V2'
end as label
from solana.core.fact_events events
where succeeded
and program_id in ('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH','ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD')
and block_timestamp >= '2023-01-01' ::date
),
aggregated as (
select
date_trunc('day',block_timestamp) as date,
label,
count(distinct tx_id) as txs,
count(distinct wallet_address) as users
from activity
group by 1,2
)
select *
from aggregated
QueryRunArchived: QueryRun has been archived