0xHaM-dDaily and new users
Updated 2022-10-09Copy Reference Fork
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 new_users as (
select
min(block_timestamp::date) as min_date,
signers[0] as users
from solana.core.fact_transactions
where instructions[0]:programId='HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
GROUP by 2
)
select
date_trunc('{{Interval}}', block_timestamp)::date as date,
'Daily Active Users' as status,
count(distinct signers[0]) as users
from solana.core.fact_transactions
where instructions[0]:programId='HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
group by 1,2
UNION ALL
select
date_trunc('{{Interval}}', min_date)::date as date,
'New Active Users' as status,
count(users) as new_users
from new_users
group by 1,2
UNION
select
date_trunc('{{Interval}}', block_timestamp)::date as date,
'Kamino Active Users' as status,
count (distinct signers[0]) as Users_Count
from solana.core.fact_transactions
where succeeded = 'TRUE'
and instructions[0]:programId = '6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc'
group by 1
Run a query to Download Data