Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/ROOT/pages/clauses/with.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ RETURN list
1+d|Rows: 1
|===

In the below example, the `WITH` clause binds all matched `Customer` nodes to a new variable, `chocolateCustomers`.
In the below example, the `WITH` clause binds all matched `Customer` nodes to a new variable, `customers`.
The bound nodes are `MAP` values which can then be referenced from the new variable.

.Create a new variable bound to matched nodes
// tag::clauses_with_new_variable[]
[source, cypher]
----
MATCH (c:Customer)-[:BUYS]->(:Product {name: 'Chocolate'})
WITH c AS customer
RETURN customer.firstName AS chocolateCustomer
WITH c AS customers
RETURN customers.firstName AS chocolateCustomers
----
// end::clauses_with_new_variable[]


.Result
[role="queryresult",options="header,footer",cols="1*<m"]
|===
| chocolateCustomer
| chocolateCustomers

| "Amir"
| "Mateo"
Expand Down