Tobi_1inherent-sapphire
Updated 2024-09-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
⌄
WITH last_month_users AS (
SELECT DISTINCT PROPOSER
FROM flow.core.fact_transactions;
WHERE BLOCK_TIMESTAMP BETWEEN DATEADD(MONTH, -2, CURRENT_TIMESTAMP()) AND DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
),
this_month_users AS (
SELECT DISTINCT PROPOSER
FROM flow.core.fact_transactions
WHERE BLOCK_TIMESTAMP >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
)
SELECT
COUNT(this_month_users.PROPOSER) AS returning_users
FROM
last_month_users
JOIN
this_month_users ON last_month_users.PROPOSER = this_month_users.PROPOSER;
QueryRunArchived: QueryRun has been archived