Skip to content

Commit 89fca4b

Browse files
committed
cleanup
1 parent b34eddb commit 89fca4b

File tree

2 files changed

+2
-57
lines changed

2 files changed

+2
-57
lines changed

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ RETURN p.name AS product,
5656

5757
| `NEXT` now correctly supports aggregations in the context of `UNION` and `CALL`.
5858
In Neo4j 2025.06, such queries yielded incorrect results while they created an error in Neo4j 2025.07.
59-
For more information on `NEXT`, see xref:queries/composed-queries/sequential-queries.adoc#next-aggregations-in-union-and-call[`NEXT` and aggregations in the context of `UNION` and `CALL`].
59+
For more information, see xref:queries/composed-queries/sequential-queries.adoc#issues-fixes[Sequential queries (`NEXT`) > Known issues and fixes].
6060

6161
a|
6262
label:functionality[]

modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ The query above calculates the total price of products purchased per customer an
481481
As of Neo4j 2025.08, this issue has been fixed.
482482
The table below summarizes the behavior changes across versions.
483483

484-
[[%header,cols="a,5a"]
484+
[%header,cols="a,5a"]
485485
|===
486486
| Neo4j version
487487
| Behavior
@@ -495,59 +495,4 @@ The table below summarizes the behavior changes across versions.
495495
| 2025.08+
496496
| `NEXT` correctly supports aggregations in the context of `UNION` branches and `CALL` subqueries.
497497
See above for more details.
498-
|===
499-
500-
As of Neo4j 2025.08, `NEXT` correctly supports aggregations in the context of `UNION` and `CALL`.
501-
In Neo4j 2025.06, such queries yielded incorrect results while they created an error in Neo4j 2025.07.
502-
503-
For example, the query from xref:#next-and-call[] produced a different result in Neo4j 2025.06, not calculating the percentages correcly:
504-
505-
.`NEXT` inside `CALL`, Cypher 2025.06
506-
[source,cypher,role=test-skip]
507-
----
508-
MATCH (p:Product) WHERE p.name <> "Coffee"
509-
CALL (p) {
510-
MATCH (p)<-[:BUYS]-(c:Customer)-[:BUYS]->(otherProduct)
511-
RETURN c, otherProduct
512-
513-
NEXT
514-
515-
RETURN count(DISTINCT c) AS customers, 0 AS customersAlsoBuyingCoffee
516-
UNION
517-
FILTER otherProduct.name = "Coffee"
518-
RETURN 0 as customers, count(DISTINCT c) AS customersAlsoBuyingCoffee
519-
520-
NEXT
521-
522-
RETURN max(customers) AS customers, max(customersAlsoBuyingCoffee) AS customersAlsoBuyingCoffee
523-
}
524-
RETURN p.name AS product,
525-
round(toFloat(customersAlsoBuyingCoffee) * 100 / customers, 1) AS percentageOfCustomersAlsoBuyingCoffee
526-
ORDER BY product
527-
----
528-
529-
.Result, Cypher 2025.06
530-
[role="queryresult",options="header,footer",cols="2*<m"]
531-
|===
532-
| product | percentageOfCustomersAlsoBuyingCoffee
533-
534-
| "Chocolate" | 100.0
535-
| "Headphones" | 100.0
536-
| "Laptop" | 100.0
537-
| "Phone" | 100.0
538-
2+d|Rows: 5
539-
|===
540-
541-
In Neo4j 2025.08+, mid-query aggregations produce the desired result when nested in a `UNION` or `CALL`:
542-
543-
.Result, Cypher 2025.08+
544-
[role="queryresult",options="header,footer",cols="2*<m"]
545-
|===
546-
| product | percentageOfCustomersAlsoBuyingCoffee
547-
548-
| "Chocolate" | 33.3
549-
| "Headphones" | 100.0
550-
| "Laptop" | 33.3
551-
| "Phone" | 100.0
552-
2+d|Rows: 5
553498
|===

0 commit comments

Comments
 (0)