Limiting Results

Limiting results by movie rating

Lowest rated movie

A movie has a property, imdbRating. Not all movies have a value for this property. Write and execute a query to determine the lowest imdbRating that a movie has in our graph.

What is the lowest imdbRating?

  • ✓ 1.6

Hint

Test the imdbRating value to make sure it exists. You should order the results and limit the number returned.

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.imdbRating IS NOT NULL
RETURN m.title, m.imdbRating
ORDER BY m.imdbRating LIMIT 1

imdbRating does it return?

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

Summary

In this challenge, you wrote a query to limit results so you could answer a question about the data.

In the next challenge, you will eliminate duplication in the results.