Skip to main content

Sort and limit results

Sort and limit sets the order of your rows and how many the query writes. See how to sort rows and grouped results, set a row limit, build a top list, and what to do when the limit cuts a pull short.

B
Written by Bradley Taylor

Sort and limit sets the order of your rows and how many of them the query writes. A new query writes up to 1,000 rows. Raise the limit when you need more.

Sort your rows

With Sort by left on No sort, rows come back in the data type's default order, such as newest first for orders.

  1. Under Sort and limit, choose a field in Sort by.

  2. Choose a direction. The labels match the field: Newest first or Oldest first for dates, Largest first or Smallest first for numbers, and A to Z or Z to A for text.

Sort grouped results

When Group and total is on, Sort by lists your groups and totals. Choose a total, such as net sales, with Largest first to rank SKUs from best to worst seller. Left on its default, a grouped table sorts newest first when it has a date group, and A to Z otherwise.

Set a row limit

Enter a number in Row limit. The most a query can return shows next to the box.

The limit applies after sorting, so a sort plus a limit gives you a top list. For example, group order lines by SKU, sort by net sales Largest first, and set the limit to 10 for your top 10 products.

When the limit cuts a pull short

If your query has more rows than the limit, the pane says how many rows it wrote out of the total, such as "Showing the first 1,000 of 4,212 rows." Large results and pull limits explains the maximums. To get everything, you can:

  • Raise the row limit, up to the maximum shown

  • Narrow your filters, such as a shorter date range

  • Turn on Group and total to summarize the rows

Did this answer your question?