Yousefi_1994Terra 6 - Weekly New User
Updated 2023-01-11
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with new_users as (
select
tx_sender as wallet_address,
min(block_timestamp)::date as creation_date
from terra.core.fact_transactions
group by wallet_address
)
select
date_trunc('week', creation_date) as "Weeks",
case
when creation_date >= '2022-12-12' and creation_date < '2022-12-26' then 'Before Christmas Holidays'
when creation_date >= '2022-12-26' and creation_date < '2023-01-02' then 'Christmas Holidays First Week'
when creation_date >= '2023-01-02' and creation_date < '2023-01-07' then 'Christmas Holidays Second Week'
end as "Period",
count(distinct wallet_address) as "Number of New User"
from new_users
where creation_date >= '2022-12-12'
and creation_date < '2023-01-07'
group by "Weeks", "Period"
order by "Weeks"
Run a query to Download Data