Skip to Main Content
Graph Data Processing with Cypher
book

Graph Data Processing with Cypher

by Ravindranatha Anthapu
December 2022
Intermediate to advanced content levelIntermediate to advanced
332 pages
6h 35m
English
Packt Publishing
Content preview from Graph Data Processing with Cypher

5

Filtering, Sorting, and Aggregations

In the last chapter, we looked at basic querying using Cypher. In this chapter, we will take it a step further by discussing adding filtering, sorting, and aggregations to the querying. We will cover these aspects in this chapter:

  • Filtering with node labels and relationship types
  • Filtering with WHERE and WITH clauses
  • Sorting data using the ORDER BY clause
  • Working with aggregations

We will start by filtering the data in queries.

Filtering with node labels and relationship types

In Cypher, filtering starts with the usage of node labels and relationship types. Let us take a look at a query where we do not apply any filters in Cypher:

MATCH p=()—-() RETURN p

This query returns all paths where any nodes are ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graph Algorithms for Data Science

Graph Algorithms for Data Science

Tomaz Bratanic
Graph Data Modeling in Python

Graph Data Modeling in Python

Gary Hutson, Matt Jackson

Publisher Resources

ISBN: 9781804611074Supplemental Content