在neo4j中,我想按降序排序基于ContactId和LookedupStatus的结果。
此查询仅根据ContactId
对结果进行排序 MATCH (p:Contact)<-[:RELATIONSHIP]-(d:GroupMember)
WHERE toint(d.GroupId) = 55
and p.EmailId<>''
RETURN p
order by toint(p.ContactId) desc
如何修改上述查询,使其在p.ContactId和p.LookedupStatus上进行排序
答案 0 :(得分:3)
您可以组合排序条件:
UNWIND [ {a:3, b:2, c: 1}, {a:1, b:2, c: 2},
{a:1, b:1, c: 3}, {a:3, b:1, c: 4} ] as n
RETURN n ORDER BY n.a DESC,
n.b ASC