SocioAnalyticaactive user
Updated 2024-01-10
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
›
⌄
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'
)
SELECT
project_name,
label_type as sector,
count(DISTINCT from_address) as active_user
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-12-31'
AND project_name is not null
AND label_type not in ('token', 'chadmin')
GROUP by 1 , 2
ORDER BY active_user DESC
LIMIT 30
QueryRunArchived: QueryRun has been archived