

# `LIMIT` and `OFFSET` clauses

`LIMIT` `count` returns at most `count` rows. `LIMIT` also takes a percentage, such as `LIMIT 50%` or `LIMIT 50 PERCENT`, which returns that share of the rows. `OFFSET` `start` skips the first `start` rows, and you can use it with or without `LIMIT`.

## Syntax
<a name="athena-duckdb-statement-select-limit-syntax"></a>

```sql
LIMIT {{count}} [ OFFSET {{start}} ]
LIMIT {{percentage}} { % | PERCENT } [ OFFSET {{start}} ]
OFFSET {{start}}
```

## Examples
<a name="athena-duckdb-statement-select-limit-examples"></a>

For a description of the sample tables that the examples on this page use, see [SELECT statement in DuckDB](duckdb-statement-select.md).

The following SQL query skips the first two orders and returns the next two.

```sql
SELECT order_id, customer
FROM sales_db.sales_parquet
ORDER BY order_id
LIMIT 2 OFFSET 2
```

The query returns the following results.


| order\_id | customer | 
| --- | --- | 
| `3` | `carol` | 
| `4` | `dave` | 

The following SQL query returns the first half of the orders.

```sql
SELECT order_id
FROM sales_db.sales_parquet
ORDER BY order_id
LIMIT 50%
```

The query returns the following results.


| order\_id | 
| --- | 
| `1` | 
| `2` | 
| `3` | 

## Considerations
<a name="athena-duckdb-statement-select-limit-considerations"></a>

Use `ORDER BY` with `LIMIT` and `OFFSET`. Without it, which rows the query returns is not guaranteed.