# by modifier

The by modifier designates a sort key,
in ascending order, and must be followed by an *attr.name*. It may be used with any command that lists or selects items, such
as list or select.

## Syntax

```
by attr.name{by attr.name...}
```
Note: If by is provided with a command
that does not naturally sort (such as the list command), the command is changed to its sorting counterpart
(for example, list becomes sort, select becomes sselect, and
so on).

## Example(s)

```
list entity by zip
```

```
sselect invoices by date by customer
```

```
list entity with name = "[mike]" by name
```

## See also

- [B-tree](https://d3codex.com/definitions/b-tree/)
- [break-on modifier](https://d3codex.com/access/break-on-modifier/)
- [by-dsnd modifier](https://d3codex.com/access/by-dsnd-modifier/)
- [by-exp modifier](https://d3codex.com/access/by-exp-modifier/)
- [by-exp-dsnd modifier](https://d3codex.com/access/by-exp-dsnd-modifier/)
- [Modifiers](https://d3codex.com/access/modifiers/)
- [sort command](https://d3codex.com/access/sort-command/)

---
Source: https://d3codex.com/access/by-modifier/ - part of the D3Codex reference.
