Reputation: 1350
I got a requirement that I have to get the nodes that grouped by all the properties of the nodes. it likes this: I have 2 nodes in neo4j db that has properties 'Name' and 'Address' that I can write the cypher sql like this: start node=node(0) match node-->record return count(),record.Name,record.address. It can be easy. but now the problem is that I have lots of properties maybe 50s and the property names are not fixed, I writes the cypher like this: start node=node(0) match node-->record return count(), record, but it can not get the result that I want. Can anybody give a hand? Thanks.
Upvotes: 0
Views: 803
Reputation: 33175
Try:
...
return record.Name!, record.Address!
Or:
where has(record.Name) and has(record.Address)
...
Upvotes: 1