adriaparcerisassolana farmers 4
Updated 2023-12-05
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
zeta as (
select
distinct signers[0] as users
from solana.core.fact_events
where program_id = 'ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD'
and block_timestamp>=current_date - interval '2 months'
),
marginfi as (
select
distinct signers[0] as users
from solana.core.fact_events
where program_id = 'MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA'
and block_timestamp>=current_date - interval '2 months'
),
jupiter as (
select
distinct signers[0] as users
from solana.core.fact_events
where program_id in ('JUP6i4ozu5ydDCnLiMogSckDPpbtr7BJ4FtzYWkb5Rk','JUP2jxvXaqu7NQY1GmNF4m1vodw12LVXYxbFL2uJvfo','JUP3c2Uh3WA4Ng34tw6kPd2G4C5BB21Xo36Je1s32Ph','JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB')
and block_timestamp>=current_date - interval '2 months'
),
total as (
select distinct users
from zeta where users in (select distinct users from jupiter where users in (select distinct users from marginfi) )
)
SELECT
trunc(block_timestamp,'day') as date,
label,
count(distinct signers[0]) as users,
count(*) as actions
from solana.core.fact_events x
join solana.core.dim_labels y on x.program_id=y.address
--join solana.core.ez_token_prices_hourly y on x.mint=y.token_address and trunc(x.block_timestamp,'day')=trunc(y.recorded_hour,'day')
where signers[0] in (select * from total)
and block_timestamp>=current_date - interval '2 months' and label<>'solana'
Run a query to Download Data