> ## Documentation Index
> Fetch the complete documentation index at: https://docs.standardcomputers.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Sorting Records by Constraint in Standard R1 Queries

> Sort Standard query results using SORT BY with ASC or DESC ordering, combined with parameter filter conditions and a LIMIT clause.

Sorting lets you control the order in which query results are returned. To sort records in a Standard table, place the sort keywords between the find conditions and the limit in your query:

```text theme={null}
[vehicles] <make "Chevy", SORT BY model ASC, LIMIT 5>
```

## Sort Keywords

<CardGroup cols={2}>
  <Card title="ASC" icon="arrow-up-a-z">
    Sort **Ascending** — orders results from A to Z (or lowest to highest for numeric values).
  </Card>

  <Card title="DESC" icon="arrow-down-z-a">
    Sort **Descending** — orders results from Z to A (or highest to lowest for numeric values).
  </Card>
</CardGroup>

## Syntax

```text theme={null}
...SORT BY const_name [ASC || DESC]...
```

<Tip>
  Combine `SORT BY` with `LIMIT` to efficiently retrieve a ranked subset of records — for example, the five most recent entries or the top-priced items.
</Tip>
