datavortexweekly trends
Updated 2024-12-23
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 WeeklyActivity AS (
SELECT
DATE_TRUNC('week', tx_2024.block_timestamp) AS activity_week,
tx_2024.sender AS user,
tx_2024.tx_hash AS tx_hash
FROM
aptos.core.fact_transactions tx_2024
WHERE
tx_2024.block_timestamp >= '2024-01-01'
AND tx_2024.block_timestamp < '2025-01-01'
),
NewUsersWeekly AS (
SELECT
activity_week,
COUNT(DISTINCT wa.user) AS new_users
FROM
WeeklyActivity wa
LEFT JOIN aptos.core.fact_transactions tx_prior
ON wa.user = tx_prior.sender
AND tx_prior.block_timestamp < '2024-01-01'
WHERE
tx_prior.sender IS NULL
GROUP BY
activity_week
),
ReturningUsersWeekly AS (
SELECT
activity_week,
COUNT(DISTINCT wa.user) AS returning_users
FROM
WeeklyActivity wa
JOIN aptos.core.fact_transactions tx_prior
ON wa.user = tx_prior.sender
AND tx_prior.block_timestamp < '2024-01-01'
GROUP BY
activity_week
QueryRunArchived: QueryRun has been archived