带有 MAX(n.property) 的 Cypher 返回节点 [英] Cypher Return Node with MAX(n.property)

查看:23
本文介绍了带有 MAX(n.property) 的 Cypher 返回节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Cypher,我试图返回最高分的节点.但是,它要么只向节点返回没有任何 id 的分数,我需要在查询中添加什么?

With Cypher, I'm trying to return the node of the highest score. However it either just returns the score without any id to the node, what do I need to add to my query?

start n=node(*) WHERE HAS(n.score) return MAX(n.score);

推荐答案

这个解决方案应该给你分数和节点.

This solution should give you both the score and node.

start n=node(*) WHERE HAS(n.score) RETURN n, n.score ORDER BY n.score LIMIT 1

这篇关于带有 MAX(n.property) 的 Cypher 返回节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆