op:desc( $column as item() ) as map:map
This function sorts the rows by the values of the specified column in descending order. The results are used by the op:order-by function.
Parameters | |
---|---|
$column | The column by which order the output. |
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:desc("Salary")) => op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.