FatemeTheLadyAccounts by their posts' likes
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
›
⌄
with
like_post_list as (
select
tx_hash,
block_timestamp,
signer_id,
split(try_parse_json(node_data:like):key:path, '/') [0] as account
from
near.social.fact_decoded_actions
join near.core.fact_transactions using (tx_hash)
where
tx_status = 'Success'
and node_data:like is not null
and block_timestamp::date<current_date
and node = 'index'
and split(try_parse_json(node_data:like):key:path, '/') [2] = 'main'
and split(try_parse_json(node_data:like):key:path, '/') [2] is not null
and try_parse_json(node_data:like):value:
type = 'like'
)
select
account as "Account id",
count(distinct tx_hash) as "Likes",
row_number() over (order by "Likes" desc ) as "rank"
from
like_post_list
group by
"Account id"
order by
"Likes" desc
Run a query to Download Data