RETURN
MATCH (n:Person)
RETURN n.name AS person, n.age AS years
ORDER BY n.age DESC
LIMIT 10Project query results with aliases, ordering, pagination, and deduplication.
Syntax#
RETURN expression [AS alias], ...
[ORDER BY expression [ASC|DESC]]
[SKIP n]
[LIMIT n]Examples#
Basic projection#
MATCH (n:Person) RETURN n.name, n.ageOrdering#
MATCH (n:Person) RETURN n.name ORDER BY n.age DESCPagination#
MATCH (n:Person) RETURN n.name ORDER BY n.age SKIP 5 LIMIT 10Distinct#
MATCH (n:Person) RETURN DISTINCT n._labelsSee Also#
- Aggregations — COUNT, SUM, AVG, COLLECT
- EXPLAIN — see the query plan
Try it
Open ↗⌘↵ to run
Loading engine…