Find people who act and direct born in the 1950’s
Find people born in the 1950’s (1950 - 1959) that are both Actors and Directors.
Update the WHERE clause to test if a Person node has:
-
ActorandDirectorlabels. -
a
bornproperty with ayearvalue in the range1950to1959inclusive.
cypher
MATCH (p:Person)
WHERE p:??????? AND p:???????
AND ??????
RETURN p.name, labels(p), p.bornHow many rows are returned?
-
✓ 80
Hint
You can test for a label using WHERE p:Label.
The born property is a date and has day, month, and year values.
You can test year using WHERE p.born.year.
Solution
The answer is 80
You can run the following query to see the result:
cypher
MATCH (p:Person)
WHERE p:Actor AND p:Director
AND 1950 <= p.born.year < 1960
RETURN p.name, labels(p), p.bornSummary
In this challenge, you wrote and executed a query that tests labels and a ranges of values.
In the next challenge, you will answer another question.