Checking for values

How many movies have a poster?

Find the titles of all movies that have a poster.

Update the WHERE clause to test if a Movie node’s poster property exists (i.e. isn’t null).

cypher
MATCH (m:Movie)
WHERE ??????
RETURN m.title

How many rows are returned?

  • ✓ 8976

Hint

You can use IS NOT NULL to test for a property that does exist and has been set.

Solution

The answer is 8976.

You can run the following query to see the result:

cypher
MATCH (m:Movie)
WHERE m.poster IS NOT NULL
RETURN m.title

Summary

In this challenge, you wrote and executed a query to test if a property does not exist.

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