Testing Equality

Horror Movie Directors

Find the directors of horror movies released in the year 2000.

cypher
MATCH (d:Director)-[:DIRECTED]->(m:Movie)-[:IN_GENRE]->(g:Genre)
WHERE ?????? AND ??????
RETURN d.name

Complete the WHERE clause by replacing the ?????? to test:

  1. The Movie year property is equal to 2000

  2. The Genre name property is equal to "Horror"

Enter the number of rows returned and click Check Answer.

  • ✓ 23

Hint

Update the WHERE clause to filter on the m.year and g.name properties.

m.year should be equal to 2000 and g.name should be equal to "Horror".

Solution

The answer is 23.

You can run the following query to see the result:

cypher
MATCH (d:Director)-[:DIRECTED]->(m:Movie)-[:IN_GENRE]->(g:Genre)
WHERE m.year = 2000 AND g.name = "Horror"
RETURN d.name

Summary

In this challenge, you wrote and executed a basic query to test equality of node properties.

In the next challenge, you will answer another question about the data in the graph.