> For the complete documentation index, see [llms.txt](https://docs.pinot.apache.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pinot.apache.org/release-1.0.0/for-users/user-guide-query.md).

# Query

Learn how to query Apache Pinot using SQL or explore data using the web-based Pinot query console.

<figure><img src="https://content.gitbook.com/content/gYpmZ5dnYUh7aQjLUJ9b/blobs/qhcdGlx7ssDcb1r7luqQ/Screen%20Shot%202023-09-13%20at%202.42.17%20AM.png" alt=""><figcaption></figcaption></figure>

{% content-ref url="/pages/-LtSZUOogdMvPabsf93k" %}
[Querying Pinot](/release-1.0.0/for-users/user-guide-query/querying-pinot.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-LtH6nl58DdnZnelPdTc-887967055/pages/qR2xVld9SJnSIL91FGcc" %}
[Query Options](/build-with-pinot/querying-and-sql/query-execution-controls/query-options.md)
{% endcontent-ref %}

### Explore query syntax:

{% content-ref url="/pages/-MggAws2aKihyebWODRF" %}
[Querying JSON data](/release-1.0.0/for-users/user-guide-query/json-queries.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-LtH6nl58DdnZnelPdTc-887967055/pages/-MEOh0QPygH7UInwQ3J6" %}
[Aggregation Functions](/functions/aggregation.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M3LBziMD\_HpraL0o0P-" %}
[Cardinality Estimation](/release-1.0.0/for-users/user-guide-query/how-to-handle-unique-counting.md)
{% endcontent-ref %}

{% content-ref url="/pages/VdRWx25vigphS3TU7WLt" %}
[Explain Plan](/release-1.0.0/for-users/user-guide-query/explain-plan.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-LtH6nl58DdnZnelPdTc-887967055/pages/f3HRzo0Ji43hjMoKuRvm" %}
[Filtering with IdSet](/build-with-pinot/querying-and-sql/sql-syntax/filtering-with-idset.md)
{% endcontent-ref %}

{% content-ref url="/pages/Xv3UlkrXQoIfO7kHagfk" %}
[GapFill Function For Time-Series Dataset](/release-1.0.0/for-users/user-guide-query/gap-fill-functions.md)
{% endcontent-ref %}

{% content-ref url="/pages/RtQJlrxn6yBu0ManW37y" %}
[Grouping Algorithm](/release-1.0.0/for-users/user-guide-query/grouping-algorithm.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-LtH6nl58DdnZnelPdTc-887967055/pages/46NTcXOpvYa63dZ9kGzk" %}
[JOINs](/build-with-pinot/querying-and-sql/sql-syntax/joins.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MVNjUwt-Bxkh66dneGN" %}
[Lookup UDF Join](/release-1.0.0/for-users/user-guide-query/lookup-udf-join.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MEO-NsU6s\_l7QpgoUUJ" %}
[Transformation Functions](/release-1.0.0/for-users/user-guide-query/supported-transformations.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MEHLPVYvb7R7dyet\_Jj" %}
[User-Defined Functions (UDFs)](/release-1.0.0/for-users/user-guide-query/scalar-functions.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-LtH6nl58DdnZnelPdTc-887967055/pages/dj6nqxwk1zzUVCt40aML" %}
[Window Functions](/functions/window.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pinot.apache.org/release-1.0.0/for-users/user-guide-query.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
