Query Builder > Sort

Learn how to sort SQL data in Draxlr's Query Builder by one or more columns in ascending or descending order, and add, edit, or remove multi-level sort rules.

Draxlr lets you easily sort your data by one or more columns, directly from the Explore interface.

How to Use the Sort Feature?

  1. Open the Sort Dialog

    • Click Sort in the left panel. Before your first step, it's under More options. After that, it's in the toolbar below your query steps.
    • The Add Sort dialog opens, where you define sorting rules.
  2. Add Sort Rules

    • For each rule, select:
      • Table: Choose the table you want to sort (e.g., Orders). Joined tables are listed too.
      • Field: Pick the field to sort by (e.g., OrderDate, ShipCountry).
      • Order: Select Ascending (A–Z, 0–9, Oldest First) or Descending (Z–A, 9–0, Newest First).
    • Click + Add More to add another sort rule. Rules apply from top to bottom, so the first rule is the primary sort.
  3. Remove Sort Rules

    • To remove a rule, click the – button next to it.
  4. Execute Sorting

    • Once you’re ready, click Execute.
    • The data table will update with your chosen sorting applied.

You can also sort by a single column from its header menu. See Table Header Actions.


Tips

  • Multi-Level Sorts: Add multiple rules for deeper sorting control.
  • Edit or Remove Rules: Use the edit and delete icons on the Sort step to change or remove it any time.
  • See Results Instantly: Data refreshes right after sorting.