I have a schema like: Topics have posts and users write topics and posts. I would like to find recommended topics. In my example I return count(topics) and count(rec_topics). How is possible to return difference bewteen these sets? Like [1,2] - [1] = [2]
Thank you
MATCH (user:User {first_name: 'HlavnĂ' }),
user<-[:wrote_by]-(posts:Post)<-[:TOPIC]-(topics:Topic)-[:TOPIC]->(all_posts:Post)-[:wrote_by]->(friends:User)<-[:wrote_by]-(friends_posts:Post)<-[:TOPIC]-(rec_topics:Topic)
WHERE NOT(topics=rec_topics)
RETURN count(DISTINCT topics),count(DISTINCT rec_topics);