MadiDaily active users
Updated 2023-01-15Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
WITH df AS (
SELECT DATE_TRUNC('day', block_timestamp) as day, TX_SIGNER as wallet
FROM near.core.fact_transactions
WHERE TX_STATUS = 'Success'
GROUP BY 1,2
),
df_day AS (
SELECT DATE_TRUNC('day', day) as day, wallet, COUNT(*) as num_days
FROM df
GROUP BY 1,2
)
SELECT day, COUNT(*) as active_users ,
sum(active_users) over (order by day) as cum_active_users
FROM df_day
WHERE day >= '2023-01-01' and day <= '2023-01-14'
GROUP BY 1 ORDER BY 1
Run a query to Download Data