Sorting Data in the Query Manager

Sort operations arrange selected data according to their attribute values.

Single and multiple sort operations can be performed. 

All changes can either be committed run-time or on request.


  1. Select the attributes you want to sort by either by:

    • Right- clicking the column header of the data you want to sort by in the data table.

    • Dragging and dropping the attribute you want to sort by from the left-hand attributes list onto the Sort column in the Query Manager.

  2. Right-click and select Sort Ascending or Sort Descending.

  3. Save and compute the task.

Sorting priorities

Sorting priorities for multiple sort operations depend on the order in which attributes are listed in the Sort column.

By default, the first selected attributes are also the first used for sorting, but the order can be changed by moving the attributes up and down within the Sort column.


The following example is based on the Adult dataset.

Sample Datasets

Scenario data can be found in the Datasets folder in your Rulex installation.

In the following example data are sorted as follows:

  • In ascending mode according to age.

  • If the age is identical data are then sorted in ascending mode according to their workclass.

  • If the workclass is identical they are sorted in a descending mode according to education-num. 

  • Sort operations on nominal attributes are performed in alphabetical order.

  • Missing values are considered the smallest values, and are therefore located at the top of the list for ascending sort operations and at the bottom of the list for descending sort operations. Note in the example above that the first elements of workclass are missing since missing values are inserted at the top of the list when an ascending sort operation has been applied.