Intermediate Cypher Queries
Take your Cypher skills further in Neo4j: advanced filtering, variable-length traversal, pipelining with WITH, subqueries, UNWIND, and parameters.
In this 1-hour course, you will learn
This course takes you beyond the basics of Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. and teaches you the query techniques that real applications depend on: precise filtering, controlled results, multi-hop Full definition for traversal (opens in a new tab)Following relationships from one node to the next to reach other parts of a graph., pipelined queries, subqueries, and parameters. You work hands-on against a live recommendations dataset throughout, writing and profiling queries in an embedded sandbox.
The recommendations graph is a realistic dataset of movies, the people who acted in and directed them, the genres they belong to, and the users who rated them. It is rich enough to ask interesting questions, which is exactly what an intermediate Cypher course needs.
Filtering Queries
Apply advanced WHERE clause techniques, including pattern predicates, list membership, and string and range filters, to precisely target nodes and relationships.
Controlling Results Returned
Use ORDER BY, SKIP, LIMIT, and aggregation functions to sort, paginate, and summarise query output for real-world reporting needs.
Working with Cypher Data
Manipulate strings, numbers, lists, and maps using built-in Cypher functions to transform and reshape data directly within your queries.
Graph Traversal
Write variable-length path patterns to traverse relationships of arbitrary depth and extract meaningful paths from connected graph data.
Pipelining Queries
Use WITH to chain query stages, pass computed values between clauses, and build multi-step data transformations within a single Cypher statement.
Subqueries
Apply CALL { } subqueries and UNWIND to process collections, execute independent query segments, and aggregate results across multiple scopes.
Using Parameters
Configure parameterised Cypher queries to separate data from query structure, improving security, performance, and reusability in applications.
7 modules, 1 hour.
- Basic Cypher Queries5 min
- Testing Equality5 min
- Querying for Null Values5 min
- Checking for values5 min
- Range Query5 min
- Testing List Inclusion5 min
- Testing Strings5 min
- Case Insensitive Search5 min
- Using the CONTAINS Predicate5 min
- Query Patterns and Performance5 min
- Testing Patterns5 min
- Profiling5 min
- Multiple MATCH Clauses5 min
- Retrieve Movies and Reviewers5 min
- OPTIONAL MATCH5 min
- Ordering Returned Results5 min
- Ordering Results5 min
- Viewing the Ordered Results5 min
- Ordering Multiple Values5 min
- Limiting or Counting Results Returned5 min
- Limiting Results5 min
- Eliminating Duplicates5 min
- Map Projections to Return Data5 min
- Changing Results Returned5 min
- Conditionally Returning Data5 min
Who this course is for
This course is for developers, data engineers, and analysts who can already write basic Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. and want to close the gap between simple lookups and production-quality queries. If you have completed Cypher Fundamentals and found yourself wondering how to filter on ranges, remove duplicate rows, follow Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node. several hops deep, or pass values into a query safely from application code, this course answers those questions. It is also a natural step for anyone preparing for Neo4j certification. You should be comfortable with basic
MATCH,WHERE, andRETURNclauses before you start; the full list of prerequisite courses appears beside this overview.What you'll do
This is a hands-on course. Every concept comes with a query you run yourself in a sandbox connected to a live Neo4j database loaded with the recommendations dataset. The course is heavy on challenges: short, concrete tasks such as finding the directors of horror movies released in 2000, retrieving people born in the 1950s who both acted and directed, or returning the highest average rated movie. The platform checks each answer against the graph, so you prove your understanding as you go rather than at the end.
You filter with ranges,
exists {}Full definition for pattern (opens in a new tab)A graph structure written in Cypher, such as a node joined to another node by a relationship., andOPTIONAL MATCH; shape results withORDER BY,LIMIT,DISTINCT, andCASE; aggregate withcount()andcollect(); and write variable-length patterns to Full definition for traversal (opens in a new tab)Following relationships from one node to the next to reach other parts of a graph. several hops from an anchor Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties.. You then pipeline queries withWITH,UNWIND, and map Full definition for projection (opens in a new tab)An in-memory copy of part of your database that graph algorithms run against. You choose which nodes and relationships it holds., keep memory under control withCALL {}subqueries andUNION, and finish by parameterising queries the way application drivers execute them in production. Several lessons usePROFILEto show how many database hits a query produces, so you start connecting the way you write a query to the work the database does to answer it.Where to go next
The natural next step is Cypher Aggregations, which goes deeper into the aggregating functions you met briefly here:
count(),collect(),sum(),avg(), percentiles, and the list functions and comprehensions that go with them. The skills in this course also map directly to the Neo4j Certified Professional exam. Filtering, Full definition for traversal (opens in a new tab)Following relationships from one node to the next to reach other parts of a graph., pipelining, and subqueries all feature in the exam, so completing this course is solid preparation as well as a practical upgrade to your day-to-day Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it..
Posts from the GraphAcademy blog.
My five favorite cards in Aura Dashboards
When Dashboards first became available in Aura, I started to move my reporting away from custom tools. Here are the five cards I use the most, and a Cypher statement behind them.
SQL to Cypher - 10 Queries You Already Know
You already know how to write these queries. This article shows you what they look like when the joins go away.
Writing Cypher Queries That Don't Lose Your Data
The query trap that hides your newest data, and the query shape that brings it back.