Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2) Count all the nodes (2 points)
- MATCH(N)
- count(N)
- 3) Count all relationships (2 points)
- MATCH ()-[r]->()
- RETURN count(r) as count
- 4) Return all nodes specific type (2 points)
- MATCH(n:Answer)
- RETURN count(n) as count
- 5) Return all nodes specific type and limit results (2 points)
- MATCH(n:User)
- RETURN n
- LIMIT 5
- 6) Return all nodes that where an attribute matches a literal of your choosing (2 points)
- MATCH (n:Answer {is_accepted: true})
- RETURN n
- 7) Return all nodes that where a string attribute starts with a literal of your choosing (2 points)
- MATCH (n:User)
- WHERE n.display_name STARTS WITH ‘D’
- RETURN n
- 8) Return all nodes that where a string attribute ends with a literal of your choosing (2 points)
- MATCH (n:User)
- WHERE n.display_name ENDS WITH ‘er’
- RETURN n
- 9) Return all nodes that where a string attribute contains a literal of your choosing (2 points)
- MATCH (n:User)
- WHERE n.display_name CONTAINS ‘con’
- RETURN n
- 10) Return a nodes attribute (2 points)
- MATCH (n)
- RETURN n.uuid
- LIMIT 1
- 11) Find nodes with specific relationships (2 points)
- MATCH (a)-[:ANSWERED]-(b)
- RETURN a,b
- 12) Find nodes with specific relationships where an attribute matches a literal of your choosing (2 points)
- MATCH (a)-[:ANSWERED]-(b)
- WHER a.display_name = “Damian Grzanka”
- RETURN a,b
- 13) Find nodes with more than 1 specific relationship (2 points)
- MATCH (a)-[:ANSWERED|COMMENTED]-(b)
- WHER a.display_name = “Damian Grzanka”
- RETURN a,b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement