如何在Neo4j Cypher中编写以下SQL查询?
SELECT t1.EmpNo,
t1.LastName,
t1.BirthDate,
t2.EmpNo,
t2.LastName,
t2.Birthdate
FROM Employee t1, Employee t2
WHERE t1.BirthDate = t2.Birthdate
AND t1.EmpNo <> t2.EmpNo
答案 0 :(得分:3)
这取决于你的模型,但最相同的形式可能是:
MATCH(t1:Employee),(t2:Employee)
WHERE t1.BirthDate = t2.BirthDate
AND t1.EmpNo <> t2.EmpNo
RETURN t1.EmpNo, t1.LastName, t1.BirthDate, t2.EmpNo, t2.LastName, t2.Birthdate
希望这有帮助。
此致 汤姆