cyphernear new and active users
Updated 2023-04-13
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
first_tx as (
select
tx_signer,
min(block_timestamp) as timestamp
from
near.core.fact_transactions
group by
1
),
daily_new_users as (
select
date_trunc('day', timestamp) as date,
count(*) as n_new_users
from
first_tx
where
date >= current_date() - {{n_days}}
and date < current_date()
group by
date
),
active_users as (
select
date_trunc('day', block_timestamp) as date,
count(distinct (tx_signer)) as active_users
from
near.core.fact_transactions
where
date >= current_date() - {{n_days}}
and date < current_date()
group by
1
)
select
*,
Run a query to Download Data