SocioAnalyticaactive user
Updated 2024-01-03
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 all_user as (
SELECT
block_timestamp,
tx_hash,
to_address,
from_address,
row_number() over (partition by from_address order by block_timestamp) as rank
FROM avalanche.core.fact_transactions
WHERE STATUS = 'SUCCESS'
)
,
active_users_q1 as (
SELECT
project_name,
count(DISTINCT from_address) as "Q1 2023"
FROM all_user a
LEFT JOIN avalanche.core.dim_labels b
on a.to_address = b.address
WHERE block_timestamp BETWEEN '2023-01-01' AND '2023-04-01'
AND project_name is not null
AND label_type not in ('token', 'chadmin')
GROUP by 1
)
,
active_users_q2 as (
SELECT
project_name,
count(DISTINCT from_address) as "Q2 2023"
FROM all_user a
LEFT JOIN avalanche.core.dim_labels b
on a.to_address = b.address
WHERE block_timestamp BETWEEN '2023-04-01' and '2023-07-01'
AND project_name is not null
AND label_type not in ('token', 'chadmin')
GROUP by 1
)
QueryRunArchived: QueryRun has been archived