amdonatusprinceTerradash Activity -Wallet Stats
Updated 2022-12-05
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
36
›
⌄
--Total number of new wallets per week
--Total number of active wallets per week based only on senders who initiate transactions
--Cumulative number of new wallets per week
WITH users_transaction as (
SELECT
block_timestamp,
tx_sender as account
FROM terra.core.fact_transactions
),
new_users_date as (
SELECT account,
MIN(block_timestamp) as min_block_timestamp
FROM users_transaction
GROUP BY account
ORDER BY 2),
new_users_weekly as (
SELECT date_trunc('week', min_block_timestamp) as block_date,
COUNT(DISTINCT account) as new_users_count
FROM new_users_date
GROUP BY 1
ORDER BY 1
),
active_users as (
SELECT
date_trunc('week', block_timestamp) as date,
COUNT(DISTINCT tx_sender) as active_user
FROM terra.core.fact_transactions
GROUP BY 1 ORDER BY 1
)
SELECT block_date::DATE as "Date",
new_users_count as "New Weekly Users",
au.active_user as "Weekly Active Users",
Run a query to Download Data