Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      ORDER BY

      Overview

      The ORDER BY statement allows you to sort the current working table based on a list of specifications.

      <order by statement> ::= 
        "ORDER BY" <sort specification> [ { "," <sort specification> }... ]
      
      <sort specification> ::=
        <value expression> [ <ordering specification> ] [ <null ordering> ]
      
      <ordering specification> ::= "ASC" | "DESC"
      
      <null ordering> ::= "NULLS FIRST" | "NULLS LAST"
      

      Details

      • When no ordering specification is provided, ASC (ascending) is applied by default. To reverse the order, you can explicitly use the DESC (descending) keyword.
      • NULLS FIRST and NULLS LAST can be used to control whether null values appear before or after non-null values when ordering the result. When null ordering is not explicitly specified:
        • NULLS LAST is applied by default when effectively ordering in ASC order.
        • NULLS FIRST is applied by default when effectively ordering in DESC order.

      Example Graph

      The following examples run against this graph:

      To create this graph, run the following query against an empty graph:

      INSERT (p1:Paper {_id:'P1', title:'Efficient Graph Search', score:6, author:'Alex', publisher:'PulsePress'}),
             (p2:Paper {_id:'P2', title:'Optimizing Queries', score:9, author:'Alex'}),
             (p3:Paper {_id:'P3', title:'Path Patterns', score:7, author:'Zack', publisher:'BrightLeaf'}),
             (p1)-[:Cites {weight:2}]->(p2),
             (p2)-[:Cites {weight:1}]->(p3)
      

      Ordering by Property

      The table can be sorted by the values of a specified property.

      MATCH (n:Paper)
      ORDER BY n.score
      RETURN n.title, n.score
      

      Result:

      n.title n.score
      Efficient Graph Search 6
      Path Patterns 7
      Optimizing Queries 9

      Ordering by Element Variable

      When an element variable is specified, the table is sorted on the _uuid of the nodes or edges.

      MATCH (n:Paper)
      RETURN n.title, element_id(n) ORDER BY n
      

      Result:

      n.title element_id(n)
      Optimizing Queries 8718971077612535810
      Efficient Graph Search 8791028671650463745
      Path Patterns 12033620403357220867

      Ordering by Expression

      The table can be sorted by the results produced by an expression.

      MATCH p = (:Paper)->{1,2}(:Paper)
      RETURN p, path_length(p) AS length ORDER BY length DESC
      

      Result:

      p
      length
      (:Paper {_id: "P1", score: 6, title: "Efficient Graph Search", author: "Alex", publisher: "PulsePress"})-[:Cites {weight: 2}]->(:Paper {_id: "P2", score: 9, title: "Optimizing Queries", author: "Alex", publisher: null})-[:Cites {weight: 1]->(:Paper {_id: "P3", score: 7, title: "Path Patterns", author: "Zack", publisher: "BrightLeaf"}) 2
      (:Paper {_id: "P1", score: 6, title: "Efficient Graph Search", author: "Alex", publisher: "PulsePress"})-[:Cites {weight: 2]->(:Paper {_id: "P2", score: 9, title: "Optimizing Queries", author: "Alex", publisher: null}) 1
      (:Paper {_id: "P2", score: 9, title: "Optimizing Queries", author: "Alex", publisher: null})-[:Cites {weight: 1]->(:Paper {_id: "P3", score: 7, title: "Path Patterns", author: "Zack", publisher: "BrightLeaf"}) 1

      Multi-level Ordering

      When there are multiple specifications, the table is sorted by the first specification listed, and for equals values, go to the next specification, and so on.

      MATCH (n:Paper)
      RETURN n.title, n.author, n.score 
      ORDER BY n.author DESC, n.score
      

      Result:

      n.title n.author n.score
      Path Patterns Zack 7
      Efficient Graph Search Alex 6
      Optimizing Queries Alex 9

      Discarding and Retaining Records After Ordering

      You may use the SKIP and LIMIT statements in combination with the ORDER BY statement to skip a specified number of records from the beginning of the table and to limit the number of records retained.

      This query returns the titles of the two papers with the second and third highest scores:

      MATCH (n:Paper)
      RETURN n.title, n.score
      ORDER BY n.score DESC SKIP 1 LIMIT 2
      

      Result:

      n.title n.score
      Path Patterns 7
      Efficient Graph Search 6

      Null Ordering

      NULLS FIRST and NULLS LAST can be used to control whether null values appear before or after non-null values when ordering the result.

      This query returns the titles of the two papers with the second and third highest scores:

      MATCH (n:Paper)
      RETURN n.title, n.publisher
      ORDER BY n.publisher NULLS FIRST
      

      Result:

      n.title n.score
      Optimizing Queries null
      Path Patterns BrightLeaf
      Efficient Graph Search PulsePress
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写