如何跳过未拆封的列表

问题描述 投票:0回答:1

我有以下查询

MATCH (n:Mob)
WITH COUNT(n) as total, COLLECT(n) as nodes
UNWIND nodes as node
WITH total, node
WHERE 8000 < node.order < 8100
RETURN node, total
SKIP 10
LIMIT 1

现在,这个查询给了我这个错误。

enter image description here

如果我去掉SKIP部分,它就能正常工作。

所以我的总体问题是,我如何SKIP一些记录?

neo4j cypher
1个回答
0
投票

这主要是我的一个误解。如果你想在把它们堆在一起之前进行过滤,那么就执行 COLLECT 在以后的阶段。

工作守则:

MATCH (n:Mob)
WITH COUNT(n) as total, n as node
WITH total, node
WHERE node.order > 1000
WITH total, node
SKIP 10
LIMIT 5
WITH collect(node) as nodes, total
RETURN nodes, total
© www.soinside.com 2019 - 2024. All rights reserved.