!CHAPTER High-level operations The following high-level operations are described here after: * [FOR](For.md): Iterate over all elements of an array. * [RETURN](Return.md): Produce the result of a query. * [FILTER](Filter.md): Restrict the results to elements that match arbitrary logical conditions. * [SORT](Sort.md): Force a sort of the array of already produced intermediate results. * [LIMIT](Limit.md): Reduce the number of elements in the result to at most the specified number, optionally skip elements (pagination). * [LET](Let.md): Assign an arbitrary value to a variable. * [COLLECT](Collect.md): Group an array by one or multiple group criteria. Can also count and aggregate. * [REMOVE](Remove.md): Remove documents from a collection. * [UPDATE](Update.md): Partially update documents in a collection. * [REPLACE](Replace.md): Completely replace documents in a collection. * [INSERT](Insert.md): Insert new documents into a collection. * [UPSERT](Upsert.md): Update an existing document, or create it in the case it does not exist. * [WITH](With.md): Specify collections used in a query (at query begin only).