h4wkNEAR New users
Updated 2023-10-22
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 base as (
select date_trunc('week', block_timestamp) as date,
-- case when b.project_name is null then 'Unlebeled'
-- else initcap(b.project_name) end as project,
tx_hash,
tx_signer as user
from near.core.fact_transactions a
left join near.core.dim_address_labels b on tx_receiver = address
where block_timestamp >= '2023-01-02'
and tx_status = 'Success'
-- and tx_signer not in (select address from near.core.dim_address_labels)
-- -- and label_type not in ('token', 'fungible_token')
)
, new_users as (
select user,
-- project,
min(date) as min_date
from base
group by 1
)
, daily_new_users as (
select min_date,
-- top_project,
count(user) as new_count
from new_users
group by 1
)
, all_users as (
select date, count(distinct user) as all_count
from base
group by 1
)
Run a query to Download Data