Kruys-Collinsytterbic-maroon
Updated 2025-01-20
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 UserActivity AS (
SELECT
from_address AS address,
DATE_TRUNC('month', block_timestamp) AS activity_month
FROM avalanche.core.fact_transactions
where from_address NOT IN ( select address from avalanche.core.dim_contracts)
UNION ALL
SELECT
to_address AS address,
DATE_TRUNC('month', block_timestamp) AS activity_month
FROM avalanche.core.fact_transactions
where to_address NOT IN ( select address from avalanche.core.dim_contracts)
),
MonthlyActiveUsers AS (
SELECT
activity_month,
address,
COUNT(*) AS transaction_count
FROM UserActivity
GROUP BY activity_month, address
),
NewUsers AS (
SELECT
address,
MIN(activity_month) AS first_active_month
FROM MonthlyActiveUsers
GROUP BY address
),
NewUserActivity AS (
SELECT
a.address,
a.activity_month,
b.first_active_month
QueryRunArchived: QueryRun has been archived