MLDZMNnewusers1 copy
Updated 2023-11-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
27
28
29
30
31
32
33
34
35
36
›
⌄
with t1 as (select
'Main post' as action_type,
SIGNER_ID,
min(block_timestamp) as min_date
from near.social.fact_decoded_actions
where BLOCK_TIMESTAMP >= CURRENT_DATE - {{Time_period_days}} and NODE='post'
and node_data ilike '%main%'
group by 1,2
union all
select
'Comment' as action_type,
SIGNER_ID,
min(block_timestamp) as min_date
from near.social.fact_decoded_actions
where BLOCK_TIMESTAMP >= CURRENT_DATE - {{Time_period_days}} and NODE='post'
and node_data ilike '%comment%'
group by 1,2
union all
select
'Follow/unfollow' as action_type,
SIGNER_ID,
min(block_timestamp) as min_date
from near.social.fact_decoded_actions
where BLOCK_TIMESTAMP >= CURRENT_DATE - {{Time_period_days}}
and node_data:graph ilike '%follow%'
group by 1,2
union all
select
'Profile actions' as action_type,
SIGNER_ID,
min(block_timestamp) as min_date
from near.social.fact_profile_changes
where BLOCK_TIMESTAMP >= CURRENT_DATE - {{Time_period_days}}
group by 1,2
union all
Run a query to Download Data