FatemeTheLadyTop Account by their post Comments
Updated 2023-03-08
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
›
⌄
-- forked from 7688d730-0e35-4ec5-85d9-b882bff27191
-- forked from 8a294db9-ac17-4f7c-9f9e-4fabc883bb60
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,
split(jsona_item_path, '/')[0] as account
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
account as "Account id",
count(distinct tx_hash) as "Comments",
row_number() over(order by "Comments" desc) as "rank"
from add_comment_list
group by "Account id"
order by "Comments" desc
Run a query to Download Data