One thing I don’t get (and which really annoys me) about N1QL is my inability to write subqueries like in SQL
For example, how would I go about writing something like:
UPDATE bucket a SET some_value = (SELECT COUNT(*) FROM bucket b WHERE a.some_other_value > a.some_value)
Without having a correlation using a document id?
This is just a basic example but also applies to updates etc.
I have read the docs but couldn’t find any working example for this case (especially in updates since you can’t use joins)