> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp.md).

# Create queries

After [connecting to most data sources](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/connect-report-designer-to-a-data-source-cp.md), a query needs to be created and assigned a name to retrieve your data. This named query can be assigned to retrieve data for the master report, sub report, or parameter selections. A JDBC data source is used to access data from relational databases using the SQL query language. Pentaho also provides two data modeling layers, Pentaho Metadata Editor and Pentaho Analyzer. The Pentaho metadata layer focuses on reporting. The other layer focuses on analysis (OLAP). Pentaho metadata relies on Pentaho’s MQL query language where Pentaho Analyzer uses Microsoft Multidimensional Expression (MDX) query language.

**Note:** The default setting for the query is to pull from session-based cache. If you do not want your query to use session-based cache, go to the **Master Report** tab then the **Attributes** tab to change the **data-cache** field to **False** so that every time the query is run or the report opens, the query will refresh.

For instructions on creating queries, see the following topics:

* [Create queries with SQL Query Designer](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp/create-queries-with-sql-query-designer-create-queries-in-prd.md)
* [Create queries with Metadata Query Editor](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp/create-queries-with-metadata-query-editor-create-queries-in-prd.md)
* [Create MDX queries](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp/create-mdx-queries-create-report-designer-queries.md)
* [Dynamic query scripting](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp/dynamic-query-scripting.md)
* [Hadoop Hive-specific SQL limitations](https://docs.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp/hadoop-hive-specific-sql-limitations.md)


---

# 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.pentaho.com/pba-report-designer/9.3-report-designer/create-queries-report-designer-cp.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.
