Testing Equality

Horror Movie Directors

Write and execute a query to return the names of directors of horror movies released in the year 2000. Use the year property of the Movie node to do the comparison as well as the name of "Horror" for the Genre node.

Once you executed, enter the number of rows returned below and click Check Answer.

  • ✓ 23

Hint

A Movie node has a property, year that you should use for the test.

You will use a pattern of a Person node with a :DIRECTED relationship to a :Movie node and the :Movie node is related to the :Genre node.

Once you have entered the answer, click the Try Again button below to continue.

Solution

You can run the following query to find the answer:

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

How many rows does it return?

Once you have entered the answer, click the Try Again button below to continue.

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.

Chatbot

Hi, I am an Educational Learning Assistant for Intelligent Network Exploration. You can call me E.L.A.I.N.E.

How can I help you today?