KARTODTerra new Users
Updated 2022-03-12Copy 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
›
⌄
with flattened_transactions as (
select
t.block_timestamp,
t.tx_id,
tx_from as wallet
from terra.transactions t
where tx_status = 'SUCCEEDED'
),
Terra_new_wallets_date AS (
select
wallet,
min(block_timestamp) :: date as join_date
from flattened_transactions
group by wallet
having join_date >= '2022-02-01'
),
temp AS (
SELECT
join_date AS time,
COUNT(wallet) AS new_wallets
FROM Terra_new_wallets_date
GROUP BY join_date
)
SELECT
time,
SUM(new_wallets) OVER (ORDER BY time) AS total_new_wallets,
new_wallets
FROM temp
ORDER BY time desc
Run a query to Download Data