Hello,
I 'd like to solve this
Assume I have something like this. ( please note that Open Doors or Close Doors is only an example ) 2 relatiionship and that my goal is to retrieve the maxId between this 2.
match (n)-[r:CLOSE_DOORS]-(m)
return max(r.ID) as maxId
UNION
match (n)-[r:OPEN_DOORS]-(m)
return max(r.ID) as maxId
But the problem is that if I use two different names for the maxId it will not work,
in case the first As is - maxIdClose and the second maxIdOpen it will throws
All sub queries in an UNION must have the same column names (line 3, column 1 (offset: 68))
"UNION"
I should filter them cause then I have to retrieve back only the maxId between this two
and also I am searching for something that is performance infact
please note that I don't want to use the other Cypher syntax cause is slower than the one I wrote befoure.
talking about this one - :|CLOSE_DOORS:|OPEN_DOORS
Thank you as always for your time.