hessNew Users Retention
Updated 2025-01-07
999
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 NewUsers AS (
SELECT
from_address,
MIN(block_timestamp) AS first_transaction
FROM
blast.core.fact_transactions
GROUP BY
from_address
),
BaseTable AS (
SELECT
from_address,
date_trunc('week', block_timestamp) AS transaction_week,
MIN(date_trunc('week', block_timestamp)) OVER (PARTITION BY from_address) AS earliest_date,
DATEDIFF('week', MIN(date_trunc('week', block_timestamp)) OVER (PARTITION BY from_address), date_trunc('week', block_timestamp)) AS difference
FROM
blast.core.fact_transactions
),
CountNewUsers AS (
SELECT
earliest_date,
COUNT(DISTINCT from_address) AS new_users
FROM
BaseTable
GROUP BY
earliest_date
),
CountReturningUsers AS (
SELECT
earliest_date,
difference,
COUNT(DISTINCT from_address) AS existing_users
QueryRunArchived: QueryRun has been archived