datavortexUsers activities
Updated 2024-12-25
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
›
⌄
⌄
--SELECT DISTINCT label_type, label_subtype, label from aptos.core.dim_labels
/*
SELECT DISTINCT
t.sender,
d.label_type
FROM
aptos.core.fact_transactions t
LEFT JOIN
aptos.core.dim_labels d
ON
t.sender = d.address
WHERE
DATE_TRUNC('month', t.block_timestamp) = DATE_TRUNC('month', CURRENT_DATE);
*/
SELECT
d.label_type,
COUNT(DISTINCT t.sender) AS address_count
FROM
aptos.core.fact_transactions t
LEFT JOIN
aptos.core.dim_labels d
ON
t.sender = d.address
WHERE
DATE_TRUNC('month', t.block_timestamp) = DATE_TRUNC('month', CURRENT_DATE)
GROUP BY
d.label_type
ORDER BY
address_count DESC;
QueryRunArchived: QueryRun has been archived