> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/consume/v1/activate/querying-data-products.md).

# Querying Data Products

Every activation path queries the same thing: the product's [semantic layer](https://v2.dataos.info/references/glossary). You write SQL or a structured query against [semantic model](/consume/v1/evaluate/assets/semantics.md) names and their dimensions and measures; the engine resolves joins, aggregations, and access policies the same way described in [Query in Studio](/consume/v1/evaluate/query-in-studio.md). You never write raw warehouse SQL or define joins yourself.

This page is the thin map. Each query surface has its own page, and the full query reference lives in References.

## How a query resolves

```
Your query  ->  semantic layer  ->  warehouse SQL (joins, aggregations, policies applied)  ->  result
```

Two things follow from this:

* You query **logical** model names and fields, not physical tables. Selected fields must be dimensions or measures the model exposes.
* Measures are wrapped with `MEASURE()` (or a matching aggregate). Dimensions are plain columns you select, filter, group, and order by.

## Where to query

<table><thead><tr><th width="457.111083984375">You want to</th><th>Use</th></tr></thead><tbody><tr><td>Validate fields and filters in the browser</td><td><a href="/pages/nztMJ2R4eVT6S9Ol1lrc">Query in Studio</a> (visual builder, Semantic SQL, GraphQL)</td></tr><tr><td>Query from a desktop SQL tool over the MySQL protocol</td><td><a href="/pages/cZPmdhcP8sSFX0VOwX9H">Database clients</a></td></tr><tr><td>Call the product programmatically from code</td><td><a href="/pages/LyBO1RyM3EvKbz3VR6eE">APIs</a></td></tr><tr><td>Save a query for reuse and serving</td><td><a href="/pages/dvr3ZebSNpVvi6SlQntF">Save as Perspective</a></td></tr></tbody></table>

For the full query reference, including the SQL form, aggregate functions, join syntax, filter operators, and the semantic query lifecycle, see the [query reference](https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/querying-data-products) in References.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/consume/v1/activate/querying-data-products.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
