0xHaM-dTerra - Weekly New User Changes
Updated 2024-01-04
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
›
⌄
with
terra_new_user as (
select
tx_sender,
min(block_timestamp) as first_transactions_timestamp
from terra.core.fact_transactions
where TX_SUCCEEDED = 'true'
group by tx_sender
)
select
date_trunc('week', first_transactions_timestamp) as "Date",
count(distinct tx_sender) as "New User Count",
sum("New User Count") over (order by "Date") as "New User Growth Trends",
count(distinct tx_sender) - lag(count(distinct tx_sender)) over (order by "Date") as "Weekly Change",
case
when "Weekly Change" > 0 then 'Increase'
when "Weekly Change" < 0 then 'Decrease'
else 'Unchanged'
end as "Status"
from terra_new_user
WHERE year("Date") = '2023'
group by "Date"
having "Date" is not null
order by "Date", "Status"
QueryRunArchived: QueryRun has been archived