Querying for Null Values

During this course and in the embedded sandbox to the right, you can type :history to see past commands and Cypher code you have executed.

Check for no tmdbId values

Using the sandbox on the right…​.

Write and execute a query to return all Movie nodes in the graph that do not have a tmdbId property.

How many Movie nodes are returned?

  • ✓ 4

Hint

Use IS NULL to test the property.

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 (m:Movie)
WHERE
m.tmdbId IS NULL
RETURN m

How many nodes 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 for null values.

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