jackguyNear Social Dashboard 7 copy
Updated 2023-03-13
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
›
⌄
-- forked from 9da86ee6-25f3-4d63-8f9a-fc98b5af914e
with tab1 as (
SELECT
signer_id,
min(date_trunc('day', block_timestamp)) as first_day,
count(DISTINCT tx_hash) as profile_change_events
FROM near.social.fact_addkey_events
GROUP BY 1
)
SELECT
avg(users),
median(users)
FROM (
SELECT
date_trunc('week', block_timestamp) as week,
count(DISTINCT SIGNER_ID) as users,
count(DISTINCT tx_hash) as events
FROM near.social.fact_decoded_actions
WHERE signer_id in (
SELECT
DISTINCT signer_id
FROM tab1
WHERE first_day BETWEEN '{{ user_group_first_day }}' AND '{{ user_group_last_day }}'
)
GROUP BY 1
)
Run a query to Download Data