cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cypher: `WITH *` is legit?

Hello All! I am looking for documentation that confirms that WITH * is a supported construct

I can’t find it on:

https://neo4j.com/docs/developer-manual/current/cypher/clauses/with/

...but it came up in an example on Slack a few days ago, and it seems to work?

1 ACCEPTED SOLUTION

Finally found it documented under RETURN * and mentally extrapolated to WITH *
Thanks for the tips, all.

View solution in original post

3 REPLIES 3

Yes it is legit and quite useful if you don't want to repeat yourself time and again
Same for return *

Just be aware that if you're calling an aggregation function in your WITH clause, it's best to be explicit unless you're sure WITH * is correct, since the other variables in scope give context to the aggregation and form the grouping key.

Finally found it documented under RETURN * and mentally extrapolated to WITH *
Thanks for the tips, all.