yasmin-n-d-r-hluna2 new user
Updated 2023-01-07Copy Reference Fork
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
31
32
33
34
35
›
⌄
with new_wallets as (
select
tx_sender,
min(block_timestamp) as new_date
from
terra.core.fact_transactions
group by
1
),
info as (
select
date_trunc('day', new_date) as daily,
count(distinct tx_sender) as new_count,
avg(new_count) over (
order by
daily,
daily rows between 6 preceding
and current row
) as ma7_new_count,
sum(new_count) over (
order by
daily
) as cum_new_count
from
new_wallets
group by
1
)
select
*
from
info
where
daily > current_date - 30
Run a query to Download Data