# 6.2 Processing

Part of: [6 Language](6-language.md)

Processing options enable transforming results of a query according to the programmer’s needs, such as ordering or truncating. These options are optional and may be used to create a (linear) pipeline for further processing result sets returned by [DATA QUERY LANGUAGE (DQL)](6-6-data-query-language-dql.md) and [DATA INTROSPECTION LANGUAGE (DIL)](6-7-data-introspection-language-dil.md) operations. In case a pipeline is composed of two or more options, the order in which they are used affects the final outcome (e.g. using ORDER ASC followed by TOP 2 in a result set composed of 4, 2, 3, and 1 returns 1 and 2; using these same two options in reverse order – i.e. TOP 2 followed by ORDER ASC – returns 2 and 4 instead). The next subsections describe the processing options provided by HDFql.

| **Processing Option** | **Description** |
|---|---|
| [ORDER](6-2-1-order.md) | Order (i.e. sort) a result set in an ascending, descending, or reverse way |
| [TOP](6-2-2-top.md) | Truncate a result set after a certain given position from the top |
| [BOTTOM](6-2-3-bottom.md) | Truncate a result set after a certain given position from the bottom |
| [FROM TO](6-2-4-from-to.md) | Retain a result set within a certain given range |
| [STEP](6-2-5-step.md) | Step (i.e. jump) through a result set at every given position |

Table 6.4 – HDFql processing options

## In this section

- [6.2.1 ORDER](6-2-1-order.md)
- [6.2.2 TOP](6-2-2-top.md)
- [6.2.3 BOTTOM](6-2-3-bottom.md)
- [6.2.4 FROM TO](6-2-4-from-to.md)
- [6.2.5 STEP](6-2-5-step.md)
