SQL is such a terrible language though, for inspiration look at <https://www.arangodb.com/docs/stable/aql/tutorial-crud.html#update-documents>
Feel free to ignore the JSON parts, but the rest of the query language is well done. I did write SQL queries that were multiple pages long full of joins and group by statements. I prefer nested foreach loops (with hand written accumulator sets for grouping) over SQL's poorly done "declarative style".