rackhaelNEAR SOCIAL 5 - MOM Growth
Updated 2023-06-30
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
›
⌄
WITH
monthly_counts AS (
SELECT
DATE_TRUNC('month', block_timestamp) AS month,
MIN(block_timestamp) AS min_block_timestamp,
COUNT(DISTINCT signer_id) AS unique_users,
COUNT(DISTINCT tx_hash) AS transactions
FROM
near.social.fact_decoded_actions
GROUP BY
month
ORDER BY
month
)
SELECT
month,
unique_users,
transactions,
(
unique_users - LAG(unique_users) OVER (
ORDER BY
month
)
) AS user_growth,
(
transactions - LAG(transactions) OVER (
ORDER BY
month
)
) AS transaction_growth,
ROUND(
(
(
unique_users - LAG(unique_users) OVER (
ORDER BY
month
Run a query to Download Data