mmdrezaDaily Follow and unfollow stats
    Updated 2023-06-17
    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