Sbhn_NPsocial2
Updated 2023-09-27Copy Reference Fork
999
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
›
⌄
-- forked from rmas / DASH - Weekly User Activity @ https://flipsidecrypto.xyz/rmas/q/BKVSXvY6nkXs/dash---weekly-user-activity
WITH
signups AS (
-- AddKey events are used as proxy for user signup
-- TX triggered upon first sign in to NEAR Social app
SELECT tx_hash
, block_timestamp
, 'SIGNUP' AS action
, signer_id AS user_account_id
FROM near.social.fact_addkey_events
),
profile_updates AS (
SELECT tx_hash
, block_timestamp
, 'UPDATE_PROFILE' AS action
, signer_id AS user_account_id
FROM near.social.fact_profile_changes
QUALIFY row_number() OVER (partition by tx_hash order by True) = 1
),
posts AS (
SELECT tx_hash
, action_id_social
, block_timestamp
, 'POST' AS action
, signer_id AS post_author_account_id
, block_id AS post_block_height
, post_text
FROM near.social.fact_posts
),
Run a query to Download Data