feyikemiNear Users Perc. Diff
Updated 2024-08-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
WITH Monthly_Users AS (
SELECT
DATE_TRUNC('month', BLOCK_TIMESTAMP) AS Month,
COUNT(DISTINCT TX_SIGNER) AS Users_Count
FROM near.core.fact_transactions
WHERE BLOCK_TIMESTAMP::DATE BETWEEN '2024-01-01' AND '2024-08-31'
AND TX_SUCCEEDED = 'true'
GROUP BY 1
)
SELECT
Month,
Users_Count,
LAG(Users_Count) OVER (ORDER BY Month) AS Previous_month_users,
((Users_Count - LAG(Users_Count) OVER (ORDER BY Month)) / LAG(Users_Count) OVER (ORDER BY Month)) *100 AS User_diff
FROM Monthly_Users
ORDER BY Month DESC
QueryRunArchived: QueryRun has been archived