forgashNEAR Post Count - JSON Parsing
    Updated 2023-09-04
    WITH main_posts as (

    select block_timestamp,
    tx_hash,
    block_id as og_post_id,
    block_id as current_post_id,
    signer_id,
    post_text
    from near.social.fact_posts
    where signer_id = 'nfcommunity.near'
    )
    ,
    reply_posts as (

    select block_timestamp,
    tx_hash,
    try_parse_json(node_data:comment):item:blockHeight::INT as og_post_id,
    block_id as current_post_id,
    signer_id,
    try_parse_json(node_data:comment):text::STRING as post_text
    from near.social.fact_decoded_actions
    where (node_data LIKE '%nfcommunity.near%'
    or signer_id = 'nfcommunity.near')
    and node = 'post'
    and og_post_id is not null

    ),
    all_posts as (
    select * from main_posts
    UNION ALL
    select * from reply_posts
    ),
    likes as (
    select *,
    try_parse_json(node_data:like) as json_data,
    json_data:key:blockHeight::INT as og_post_id,
    Run a query to Download Data