---
schema_version: "1"
id: 6fbf9f40cba9d5dde00ed33d66e1d23ebcf9bec0cb5f18f4f4fa30fe852edd36
title: offset
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-statement-offset.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-statement-offset.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c63e600739bd6ed6c419cdb804e3d9b4a1a239e744d928d467fd6317077f33fe
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# offset

Use `offset` to page through the results of your query.

## Syntax

```nolang
result = offset rows number;
```

## Usage

Skips over the specified number of rows when returning the results of a query. You typically use `offset` to paginate the query results.

When using `offset` in your SAQL statements, be aware of these rules:

- The order of `filter` and `order` can be swapped because it doesn't change the results
- `offset` must be after `order`
- `offset` must be before `limit`
- There can be no more than one `offset` statement after a `foreach` statement

## Example - Return Rows 51–101

This example loads the opportunity dataset, sorts the rows in alphabetical order by account owner, and returns rows 51–101:

```nolang
q = load "DTC_Opportunity";
q = order q by 'Account_Owner';
q = foreach q generate 'Account_Owner' as 'Account_Owner', 'Account_Type' as 'Account_Type', 'Amount' as 'Amount';
q = offset q 50;
q = limit q 50;

```

**See Also**

- [Statements](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-statements.md)
