MATCH pa=(j:User)-[r:PostLikeRel|:ReplyRel|:RetweetRel]->(m:User{guid:"f092a1dc6c23b26b020bda24b9e8c923"}) 
where (j.acc is not null and j.acc <> '' and j<>m)
with collect({acc:j.acc, guid:j.guid, pcnt:coalesce(r.pcnt,0), lcnt:coalesce(r.lcnt,0), type:type(r)} ) as rows1

OPTIONAL MATCH po=(j:User)<-[r:PostLikeRel|:ReplyRel|:RetweetRel]-(m:User{guid:"f092a1dc6c23b26b020bda24b9e8c923"}) 
where (j.acc is not null and j.acc <> '' and j<>m) 
with rows1+ collect({acc:j.acc, guid:j.guid, pcnt:coalesce(r.pcnt,0), lcnt:coalesce(r.lcnt,0), type:type(r)+"_"}) as allrows

unwind allrows as row
with row.acc as acc, row.guid as guid, row.pcnt+row.lcnt as pcnt, row.type as type
return acc,guid, pcnt,type
order by pcnt desc
skip 0 limit 20

  

相关文章:

  • 2021-10-15
  • 2021-06-01
  • 2021-10-05
  • 2022-02-05
  • 2022-12-23
  • 2021-06-13
  • 2022-12-23
  • 2021-05-01
猜你喜欢
  • 2021-09-13
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-12-29
  • 2022-12-23
相关资源
相似解决方案