Spectersectors
Updated 2024-10-15
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT
DATE_TRUNC('week', BLOCK_TIMESTAMP) AS Date,
INITCAP(label_type) AS label,
INITCAP(label) AS Project_name,
COUNT(DISTINCT Sender) AS Addresses
FROM
aptos.core.fact_events
INNER JOIN aptos.core.dim_labels ON Address = EVENT_ADDRESS -- Joining to get the label of the project
INNER JOIN aptos.core.fact_transactions USING (VERSION) -- Joining transactions and events based on VERSION
WHERE
BLOCK_TIMESTAMP >= '2024-01-01'
AND SUCCESS = TRUE
AND label_type NOT IN ('cex', 'token')
AND Project_name IS NOT NULL
GROUP BY
Date, label_type, Project_name
ORDER BY
Date; -- Ordering by date
QueryRunArchived: QueryRun has been archived