How to properly write the following Cypher query:
MATCH (p:Profile)-[hvo:HAS_VOTE_ON]-(c:Criterion)
WHERE c.id IN [1,2,3,4,5]
WITH p, collect(hvo) as hvos
WHERE size(hvos) = size( [1,2,3,4,5]) return count(p)
Is it possible to rewrite it with exists or something like this?
I need to effectively check that p has :HAS_VOTE_ON on all c where c in the provided list ofIds. What is the most effective way to do such check? I need to cobine this query in the logical AND.. for example - AND exists {...}