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

# LIMIT

> Cap the number of rows the report returns

`LIMIT` caps how many rows the report returns. It is most useful with [ORDER BY](/stockfulql/syntax/order-by), which decides which rows survive the cap.

```sql theme={null}
FROM sales
  SHOW total_revenue
  GROUP BY vendor
  ORDER BY total_revenue DESC
  LIMIT 10
```

This keeps the ten vendors with the highest revenue. Without an `ORDER BY`, the rows kept are not meaningfully ranked.

`LIMIT` caps the rows in the results table. To cap how many categories a chart plots instead, use the `ITEMS` option on [VISUALIZE](/stockfulql/syntax/visualize).
