# Ordered queries

In this section, you'll see how to order queries:

> You can try this directly in our [**alphanet indexer's playground**](https://indexer-alphanet.ternoa.dev/) or our [**mainnet indexer's playground**](https://indexer-mainnet.ternoa.network/)

Each field generates a sort option that you can apply on any request. For example:

### Query NFTs ordered by creation timestamp

```graphql
query {
  nftEntities(
    first: 10
    offset: 0
    orderBy: TIMESTAMP_CREATE_DESC
  ) {
    totalCount
    nodes {
      nftId
      owner
      collectionId
      offchainData
      timestampCreate
    }
  }
}
```

You can put as many sort fields as you need:

### Query NFTs ordered by creation timestamp and price

```graphql
query {
  nftEntities(
    first: 10
    offset: 0
    orderBy: [TIMESTAMP_CREATE_DESC, PRICE_ASC]
  ) {
    totalCount
    nodes {
      nftId
      owner
      price
      priceRounded
      timestampCreate
    }
  }
}
```

<figure><img src="/files/WNe6jnWGV7YSCU3afSw7" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ternoa.network/build-1/javascript/indexer/global-requests/ordered-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
