# OFFSET query \_sql is not recognizing

**URL:** <https://discuss.elastic.co/t/offset-query-sql-is-not-recognizing/324473>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [February 1, 2023, 6:22pm UTC](https://discuss.elastic.co/t/offset-query-sql-is-not-recognizing/324473 "2023-02-01T18:22:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergioFF](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@SergioFF](https://discuss.elastic.co/u/SergioFF)\
**Post date:** [February 1, 2023, 6:22pm UTC](https://discuss.elastic.co/t/offset-query-sql-is-not-recognizing/324473/1 "2023-02-01T18:22:19Z")

</div>

Hello, I have version 8.5.2 of Elasticsearch and I am trying to use the OFFSET clause within a query, but it is not recognizing it, can this clause be used in the version we have? The query I am sending is as follows:

```auto
GET /_sql?format=json
{
    "query": """ SELECT * FROM "index" LIMIT 10 OFFSET 5 """
}

```

Can you help me? "And what options do I have if I want to paginate backwards?  
Thank you very much

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [February 1, 2023, 7:21pm UTC](https://discuss.elastic.co/t/offset-query-sql-is-not-recognizing/324473/2 "2023-02-01T19:21:58Z")

</div>

Hi @SergioFF

I believe OFFSET not supported. Read this [post](https://discuss.elastic.co/t/how-to-use-pagination-in-elastic-search-sql/191135).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 1, 2023, 7:22pm UTC](https://discuss.elastic.co/t/offset-query-sql-is-not-recognizing/324473/3 "2023-03-01T19:22:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
