Retrieving movies in a genre with their reviewers
Here is a query that returns the titles of all Film Noir movies and the users who rated them.
Execute this query:
cypher
MATCH (m:Movie)-[:IN_GENRE]->(g:Genre)
WHERE g.name = 'Film-Noir'
MATCH (m)<-[:RATED]-(u:User)
RETURN m.title, u.name
How many rows are returned?
-
✓ 1140
Hint
In this query we are performing two MATCH
clauses where the movie found in the first match is used to find all users that rated that particular movie.
Once you have entered the answer, click the Try Again button below to continue.
Solution
The correct answer is: 1140
Once you have entered the answer, click the Try Again button below to continue.
Summary
In this challenge, you executed a query to retrieve movies and reviewers that have values in the graph.
In the next challenge, you will modify the query to expand what results are returned by optionally matching rows.