neo4j查询语句

一:查询

比较操作:

=
<>
<
>
<=
>=

 

布尔操作:

AND
OR
NOT
XOR

 

 

1、把节点的前两个字为"提示"的节点去除"提示":

match(l) where l.name=~'提示.*' 
with collect(l.name)
as result 
unwind result as row 
return substring(row,2)

2、把带提示的节点,更新为不带提示:

match(l) where l.name=~'提示.*' 
with collect(l.name)
as result 
unwind result as row 
match(h) where h.name=row set h.name=substring(row,2)
return h

 3、分组查询,每个标签的数目,按名字的数目倒排

match(l) 
with collect(l.name) as collectName
unwind collectName as p
return p,count(*)as num order by num desc

 4.查询不存在emergency属性的疾病

match(d:Disease) where not exists (d.emergency) return d.name

 5.查询Condition标签中包含"任二"的节点

match(c:Condition) where c.name contains "任二" return c.name

6.查询疾病没有high_risk属性的节点

match(d:Disease) where d.high_risk is NULL return d.name

 

转载于:https://www.cnblogs.com/kwzblog/p/10616175.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值