imdb ratings
Lowest rating
This query returns the movie titles with the highest imdbRating
values first:
cypher
MATCH (m:Movie)
WHERE m.imdbRating IS NOT NULL
RETURN m.title, m.imdbRating
ORDER BY m.imdbRating DESC
Modify the query to return the movie titles with the lowest imdbRating
values first.
What is the lowest imdbRating value for a movie?
-
✓ 1.6
Hint
The results will need to be ordered in ascending order.
Solution
The correct answer is: 1.6
You can run the following query to see the result:
cypher
MATCH (m:Movie)
WHERE m.imdbRating IS NOT NULL
RETURN m.title, m.imdbRating
ORDER BY m.imdbRating ASC
Summary
In this challenge, you wrote a query to return results in a specified order.
In the next challenge, you will return results sorted by multiple values