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

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

问题描述

使用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)的密码返回节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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