
op:asc( $column as item() ) as map:map
This function sorts the rows by the values of the specified column in ascending order. The results are used by the op:order-by function.
| Parameters | |
|---|---|
| $column | The column to order the output. The column can be named with a string or a column function such as op:col, op:view-col, or op:schema-col, or constructed from an expression with the op:as function. |
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
op:from-view("main","employees")
=> op:order-by(op:asc("Salary"))
=> op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.