adriaparcerisasbase new users sectors 3
Updated 2024-03-21
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
›
⌄
-- forked from base new users sectors @ https://flipsidecrypto.xyz/edit/queries/79ec1a42-2b51-4eab-8dd4-78c0474c4aae
WITH
active_users as (
SELECT
distinct ORIGIN_FROM_ADDRESS as users,
label_type,
min(trunc(block_timestamp,'week')) as weeks
from base.core.fact_event_logs x
join base.core.dim_labels y on x.contract_address=y.address
group by 1,2
),
final as (
select
trunc(weeks,'week') as date,
label_type as sector,
count(distinct users) as new_users,
sum(new_users) over (partition by sector order by date) as "Total unique users"
from active_users
group by 1,2
order by 1 asc
) select sector, new_users from final where date ='2023-10-16'
QueryRunArchived: QueryRun has been archived