I want to get all the distinct values of a particular node property, and map each one to a unique integer.
MATCH (n) RETURN DISTINCT n.property
But how do I continue to use the RETURNed list in the query?
Edit: I got it, thanks:
MATCH (n)
WITH DISTINCT n.property AS properties
...
I played with WITH a little bit but could not get to work with DISTINCT. Can you provide an example of using both those keywords?