Home » Neo4j Order By Clause

Neo4j Order By Clause

by Online Tutorials Library

Neo4j Order By Clause

In Neo4j, The ORDER BY Clause is used to arrange the result data in order.

Syntax:

Let’s create some nodes in the Neo4j database.

Output:

Neo4j Orders by clause 1

You can see that 6 nodes are created.

Output:

Neo4j Orders by clause 2


Order Nodes by Multiple Properties

ORDER BY clause is used to arrange the nodes based on multiple properties.

Syntax:

Example:

Output:

Neo4j Orders by clause 3


Order Nodes in Descending Order

Syntax:

Now arrange the nodes of the database in descending order:

Output:

Neo4j Orders by clause 4

Next TopicNeo4j Limit Clause

You may also like