walemathsWeekly New Users
Updated 2024-08-07
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
›
⌄
-- forked from Masi / Weekly New Users @ https://flipsidecrypto.xyz/Masi/q/nhjmQQ02yT3x/weekly-new-users
with tb1 as ( select block_timestamp,
tx_signer as user
from near.core.fact_transactions
where TX_SUCCEEDED = 'true'
UNION
select block_timestamp,
tx_receiver as user
from near.core.fact_transactions
where TX_SUCCEEDED = 'true'
)
,
tb2 as ( select min(block_timestamp) as min,
user
from tb1
group by 2)
select trunc(min,'week') as weekly,
count(DISTINCT user) as users,
sum(users) over (order by weekly asc) as cumulative_users
from tb2
where min::date >= '2023-01-01'
and user not in (select address from near.core.dim_address_labels)
group by 1
QueryRunArchived: QueryRun has been archived