0xHaM-dActivity of Active Users
Updated 2023-01-17Copy 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
›
⌄
with wallet_age AS (
SELECT
TX_SENDER as address,
count(TX_ID) as tx_counts,
count(distinct date(block_timestamp)) as days_active,
min(date(block_timestamp)) as first_tx,
max(date(block_timestamp)) as last_tx,
datediff('day', last_tx, getdate()) as days_last_active,
datediff('day', first_tx, getdate()) as age_today
from terra.core.fact_transactions
group by 1
),
active_users AS (
SELECT
distinct address
FROM wallet_age
WHERE tx_counts < 10000 AND days_active >= 7 AND days_last_active <= 7
GROUP BY 1
)
SELECT
date(block_timestamp) as date,
count(distinct TX_SENDER) as "Active Users Online",
count(distinct TX_ID) as "Tx Count"
from terra.core.fact_transactions
where TX_SENDER IN (select address from active_users)
group by 1
order by 1
Run a query to Download Data