关于neo4j:neo4j-查询根节点
match (root:MENUCATALOG)where not (:MENUCATALOG)-->(root)return root match (root:MENUCATALOG)optional match (root)<-[]-(n1:MENUCATALOG)with root, n1where n1 is nullreturn root match (:MENUCATALOG)-[]->(n0:MENUCATALOG)with collect(distinct id(n0)) as id0match (root:MENUCATALOG)where not id(root) in id0return root match p=(root:MENUCATALOG)-[*]->(:MENUCATALOG)return rootorder by length(p) desclimit 1