I have set of nodes with property "x". I want to create node with property "y" and make relationships to "x" nodes in one query. I made this query:
MATCH (x) WHERE has(x.x) CREATE (y{y:"y"}), (y)-[:REL]->(x);
This makes two nodes "y" and each of them have one relationship to "x", but I want one node "y" and from this node two relationships to every "x" node.
MERGE
for your y node, something likeMERGE (y{y:"y"}) CREATE y-[:REL]->x
? – jjaderberg