mmdrezaDaily Follow and unfollow stats
Updated 2023-06-17
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
›
⌄
with follow as (
select
date_trunc('day',block_timestamp) as date,
count(distinct tx_hash) as follow
from near.social.fact_decoded_actions
where node_data:graph ilike '%follow%'
group by 1
),
unfollow as (
select
date_trunc('day',block_timestamp) as day,
count(distinct tx_hash) as Unfollow
from near.social.fact_decoded_actions
where node_data:graph ilike '%unfollow%'
group by 1
)
select
date,
follow,
unfollow,
sum(follow) over (order by date asc) as cumulative_follow,
sum(unfollow) over (order by date asc) as cumulative_unfollow
from follow,unfollow
where date = day
group by 1,2,3
Run a query to Download Data