Skip to main content
The UNWIND clause transforms a list into individual rows, creating one row for each element in the list.

Behavior

  • Each element in the list becomes a separate row
  • The order of rows preserves the original list order
  • Useful for processing lists, creating multiple entities, or parameter expansion

Basic Example

Create a node with an array property:
Unwind the array into individual rows:
Result:

Practical Examples

Create Multiple Nodes from a List

Process Nested Data

Combine with Other Clauses

Frequently Asked Questions

UNWIND transforms a list into individual rows, creating one row per element. It is the inverse of the collect() aggregation function.
Yes. You can unwind inline lists directly: UNWIND ['Alice', 'Bob'] AS name CREATE (:Person {name: name}). This is useful for batch operations.
If the list is empty, UNWIND produces zero rows, effectively eliminating that record from the result stream. No subsequent clauses will execute for that record.
Yes. You can unwind lists of maps and access their properties: UNWIND [{name: 'Alice'}, {name: 'Bob'}] AS person CREATE (:Person {name: person.name}).