YMatrix
Quick Start
Connecting
Benchmarks
Deployment
Data Usage
Manage Clusters
Upgrade
Global Maintenance
Expansion
Monitoring
Security
Best Practice
Technical Principles
Data Type
Storage Engine
Execution Engine
Streaming Engine(Domino)
MARS3 Index
Extension
Advanced Features
Advanced Query
Federal Query
Grafana
Backup and Restore
Disaster Recovery
Graph Database
Introduction
Clauses
Functions
Advanced
Guide
Performance Tuning
Troubleshooting
Tools
Configuration Parameters
SQL Reference
The SKIP clause specifies the number of initial rows to omit from the output.
SKIP trims the result set from the top. Note that result order is not guaranteed unless explicitly specified by an ORDER BY clause. SKIP accepts any expression that evaluates to a non-negative integer.
To return a subset of results starting after the first N rows, use the following syntax:
SELECT *
FROM cypher('graph_name', $$
MATCH (n)
RETURN n.name
ORDER BY n.name
SKIP 3
$$) AS (names agtype);
Returns results after skipping the first three rows.
| names |
|---|
"D" |
"E" |
| 2 rows |
To return a subset starting at an arbitrary position, combine SKIP with LIMIT.
SELECT *
FROM cypher('graph_name', $$
MATCH (n)
RETURN n.name
ORDER BY n.name
SKIP 1
LIMIT 2
$$) AS (names agtype);
Returns two vertices from the middle of the ordered result set.
| names |
|---|
"B" |
"C" |
| 2 rows |
Expressions may be used with SKIP to dynamically determine how many rows to skip.
SELECT *
FROM cypher('graph_name', $$
MATCH (n)
RETURN n.name
ORDER BY n.name
SKIP (3 * rand()) + 1
$$) AS (a agtype);
Skips the first two vertices and returns the last three.
| names |
|---|
"C" |
"D" |
"E" |
| 3 rows |