hessMonthly New Users
Updated 2024-06-28
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
›
⌄
with fees as ( select DISTINCT tx_id -- remove Oracle txns
from sei.core.fact_transactions
where fee = '0usei'
)
,
users as ( select DISTINCT attribute_value as addresses,
tx_id,
block_timestamp
from sei.core.fact_msg_attributes
where attribute_key in ('sender','fee_payer','recipient','receiver')
and attribute_value not in (select attribute_value
from sei.core.fact_msg_attributes
where attribute_key ilike '%contract_address%'
and block_timestamp::date >= '2023-08-15')
and tx_id not in (select tx_id from fees)
and block_timestamp::date >= '2023-08-15'
)
,
new as ( select min(block_timestamp::date) as date,
addresses
from users
group by 2)
select trunc(date,'month') as monthly,
count(DISTINCT addresses) as "New Users",
sum("New Users") over (order by monthly asc) as "Cumulative New Users"
from new
where date >= '2023-08-15'
group by 1
QueryRunArchived: QueryRun has been archived