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

# Sorting

> How to sort query results using the orderBy parameter in the SkillsDB GraphQL API

<Info>
  **Quick Summary:** Use the `orderBy` parameter in SkillsDB GraphQL queries to sort results in ascending (`ASC`) or descending (`DESC`) order by any supported field.
</Info>

In most query operations, we provide the ability to sort the result set using the orderBy input parameter.

For example:

```graphql theme={null}
query getDomains {
  getDomains (input: {
    orderBy: {
      DomainName: ASC
    }
  }) {
    count
    data {
      DomainId
      DomainName
    }
  }
}
```

In this query, we are asking for the domains but they need to be sorted in ascending order based on the `DomainName`.

The other value allowed is of course `DESC`:

```graphql theme={null}
query getDomains {
  getDomains (input: {
    orderBy: {
      DomainName: DESC
    }
  }) {
    count
    data {
      DomainId
      DomainName
    }
  }
}
```

***

# Need Help?

<Info>
  If you run into any issues or have questions, reach out to your organization's SkillsDB administrator or contact [SkillsDB Support](https://www.skillsdb.com/support).
</Info>
