Match Intersection with exact number of related nodes
WITH ["Ram", "Sita", "Hari"] as names MATCH (u:User)-[:IS_PARTICIPANT]->(c:Conversation) WHERE u.name IN names WITH c, size(names) as inputCnt, count(DISTINCT u) as userCnt WHERE userCnt = inputCnt and size(()-[:IS_PARTICIPANT]->(c)) = inputCnt RETURN c
Reply