Yousefi_1994Social Dashboard - Daily Post Comments
Updated 2023-06-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with add_comment_list as (
select
tx_hash,
block_timestamp,
signer_id,
node,
parse_json(node_data:comment) as jsona_comment,
parse_json(node_data:comment):item:path as jsona_item_path
from near.social.fact_decoded_actions
join near.core.fact_transactions using(tx_hash)
where tx_status = 'Success'
and node = 'post'
and jsona_comment is not null
and jsona_item_path is not null
)
select
date_trunc('day', block_timestamp) as "Date",
count(distinct tx_hash) as "Total Number of Comments",
sum("Total Number of Comments") over (order by "Date") as "Cumulative Number of Comments"
from add_comment_list
group by "Date"
Run a query to Download Data