Neo4j Docs Docs
Docs
Neo4j DBMS
  • Getting Started
  • Operations
  • Migration and Upgrade
  • Status Codes
  • Java Reference
  • Kerberos Add-on
  • Change Data Capture (CDC)
Neo4j Aura
  • Neo4j Aura
  • Neo4j AuraDB
  • Neo4j AuraDS
Neo4j Tools
  • Neo4j Bloom
  • Neo4j Browser
  • Neo4j Data Importer
  • Neo4j Desktop
  • Neo4j Ops Manager
Neo4j Graph Data Science
  • Neo4j Graph Data Science Library
Cypher Query Language
  • Cypher
  • Cypher Cheat Sheet
  • APOC Library
Create applications
  • Python Driver
  • Go Driver
  • Java Driver
  • JavaScript Driver
  • .Net Driver
  • Neo4j GraphQL Library
  • HTTP API
  • OGM Library
  • Spring Data Neo4j
  • Neo4j Connector for Apache Spark
  • Neo4j Connector for Apache Kafka
Labs
arrows.app
  • Details
  • arrows.app
APOC Extended
  • Documentation
  • Developer Guide
Halin
ETL Tool
  • Details
  • Documentation
Neo4j Migrations
  • Details
  • Documentation
Neo4j Plugin For Liquibase
  • Details
  • Documentation
Neosemantics
  • Getting Started
  • Documentation
Neo4j Helm
  • Details
  • Documentation
NeoDash
  • Details
  • Documentation
neomodel
  • Details
  • Documentation
Get Help
GraphAcademy
  • Free, Self Paced Training
  • Certification
Community Forum
Discord Chat
Knowledge Base
Neo4j Developer Blog
Neo4j Videos
Get Started Free
Search
Product Version
    • Introduction
      • Overview
      • Cypher and Neo4j
      • Cypher and Aura
    • Queries
      • Core concepts
      • Basic queries
      • Cypher expressions
      • Conditional expressions (CASE)
    • Clauses
      • Clause composition
      • MATCH
      • OPTIONAL MATCH
      • RETURN
      • WITH
      • UNWIND
      • WHERE
      • ORDER BY
      • SKIP
      • LIMIT
      • CREATE
      • DELETE
      • SET
      • REMOVE
      • FOREACH
      • MERGE
      • CALL procedure
      • UNION
      • USE
      • LOAD CSV
      • SHOW FUNCTIONS
      • SHOW PROCEDURES
      • SHOW SETTINGS
      • SHOW TRANSACTIONS
      • TERMINATE TRANSACTIONS
    • Subqueries
      • CALL subqueries
      • CALL subqueries in transactions
      • EXISTS subqueries
      • COUNT subqueries
      • COLLECT subqueries
    • Patterns
      • Concepts
      • Primer
      • Syntax and semantics
    • Values and types
      • Property, structural, and constructed values
      • Temporal values
      • Spatial values
      • Working with null
      • Lists
      • Maps
      • Casting data values
      • Type predicate expressions
    • Functions
      • Predicate functions
      • Scalar functions
      • Aggregating functions
      • List functions
      • Mathematical functions - numeric
      • Mathematical functions - logarithmic
      • Mathematical functions - trigonometric
      • String functions
      • Temporal functions - instant types
      • Temporal functions - duration
      • Spatial functions
      • LOAD CSV functions
      • Graph functions
      • Database functions
      • User-defined functions
    • Indexes for search performance
    • Full-text search index
    • Vector search index
    • Constraints
      • Syntax
      • Examples
    • Execution plans and query tuning
      • Understanding execution plans
      • Operators
        • Operators in detail
      • Cypher runtimes
        • Concepts
        • Parallel runtime: reference
      • Query tuning
        • The use of indexes
        • Planner hints and the USING keyword
        • Query options
    • Query caches
      • Unifying query caches
    • Administration
    • Syntax
      • Parsing
      • Naming rules and recommendations
      • Variables
      • Reserved keywords
      • Parameters
      • Operators
      • Comments
    • Deprecations, additions, and compatibility
    • Appendix
      • Cypher styleguide
      • Tutorials and extended examples

Is this page helpful?

  • Cypher Manual
  • Subqueries
Edit this Page

Subqueries

A Cypher® subquery is called from an enclosing outer query, and executes within its own scope, as defined by { and }.

For more information, see the following sections:

  • CALL subqueries

  • CALL subqueries in transactions

  • EXISTS subqueries

  • COUNT subqueries

  • COLLECT subqueries Introduced in 5.6

SHOW TRANSACTIONS CALL subqueries
13 & 14 December 2023

Neo4j Connections

Join us for a day of Generative AI and Knowledge Graphs: Unveiling the future of Knowledge Retrieval

Save your spot

Learn

  • Sandbox
  • Neo4j Community Site
  • Neo4j Developer Blog
  • Neo4j Videos
  • GraphAcademy
  • Neo4j Labs

Social

  • Twitter
  • Meetups
  • Github
  • Stack Overflow
  • Want to Speak?

Contact Us →

  • US: 1-855-636-4532
  • Sweden +46 171 480 113
  • UK: +44 20 3868 3223
  • France: +33 (0) 1 88 46 13 20

© 2023 Neo4j, Inc.
Terms | Privacy | Sitemap

Neo4j®, Neo Technology®, Cypher®, Neo4j® Bloom™ and Neo4j® Aura™ are registered trademarks of Neo4j, Inc. All other marks are owned by their respective companies.