feyikemiNEAR Users Count
Updated 2024-07-22
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
›
⌄
WITH transactions AS (
SELECT
block_timestamp,
tx_signer AS user
FROM near.core.fact_transactions
WHERE TX_SUCCEEDED = TRUE
UNION
SELECT
block_timestamp,
tx_receiver AS user
FROM near.core.fact_transactions
WHERE TX_SUCCEEDED = TRUE
),
daily_user_counts AS (
SELECT
DATE_TRUNC('day', block_timestamp) AS daily,
COUNT(DISTINCT user) AS users
FROM transactions
WHERE block_timestamp::date > CURRENT_DATE - INTERVAL '30 DAY'
GROUP BY daily
)
SELECT
AVG(users) AS avg_users,
SUM(users) AS total_users
FROM daily_user_counts;
QueryRunArchived: QueryRun has been archived