Navidnumber of active users during time
Updated 2022-10-11Copy 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
›
⌄
-- number of active users during time
with unique_dates as (
select
block_timestamp::date as day
from
solana.core.fact_transactions
where
instructions[0]:programId='HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
group by
day
), user_txs as (
select
signers[0] as user_id,
block_timestamp::date as day
from
solana.core.fact_transactions
where
instructions[0]:programId='HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
)
select
a.day,
count(distinct b.user_id) as "Number of Active Users",
sum("Number of Active Users") over (order by a.day asc) as "Cumulative Number of Active Users"
from
unique_dates a join user_txs b on a.day > b.day and a.day-10 < b.day
group by
1
order by
1 asc
Run a query to Download Data