I would like to select TotalResult node by related ModelResults nodes with a cypher query.
In the below image I would like to select the specified gray node that is related to exactly 3 green results nodes with IDs [5368, 5410, 5388]
I know that the below query is not correct because if you give it IDs[5368, 5410] it will select both gray "total results" nodes.
MATCH (totalResult:TotalResult)-[r:USE]->(modelResult:ModelResult) WHERE ID(modelResult) IN [5368, 5410, 5388] RETURN totalResult, r, modelResult;
I tried to create a query like the below one but it is an invalid query.
MATCH (totalResult:TotalResult)-[r:USE]->(modelResult:ModelResult)
WHERE ALL(modelResult IN CALL {MATCH (result:ModelResult) WHERE ID(result) IN [5368, 5410, 5388] RETURN result})
AND ALL(CALL{MATCH (result:ModelResult) WHERE ID(result) IN [5368, 5410, 5388] RETURN result} EXISTS nodes(modelResult))
RETURN totalResult, r, modelResult;
Please let me know is it possible to select a node by its exactly related nodes IDs and how?
Thanks.