# Apply a Proposed Query

Source: https://userguide.qualytics.io/explore/how-tos/explore-assistant/apply-a-proposed-query/

Ask the Explore Assistant for a query in plain words. It answers with a proposed query that you can copy, apply to the workspace, or apply and run in one click.

> **Info: Related**
>
> - Concept: [Explore Assistant](https://userguide.qualytics.io/explore/deep-dive/explore-assistant/) for what the assistant sees of your workspace.
> - [Fix a Failed Query](https://userguide.qualytics.io/explore/how-tos/explore-assistant/fix-a-failed-query/) to ask for a fix after an error, and [Apply a Proposed Chart](https://userguide.qualytics.io/explore/how-tos/explore-assistant/apply-a-proposed-chart/) to chart a result.

> **Note: Before you start**
>
> The Explore Assistant needs AgentQ set up for your organization, and it docks beside the workspace on wider screens only. What it can read of your workspace and results depends on the AgentQ access level. See [AgentQ Access Controls](https://userguide.qualytics.io/agentq/deep-dive/access-controls/).

**Step 1:** Open the workspace. If the assistant panel on the right is minimized, click **Expand AgentQ** .

**Step 2:** Type what you want to see, for example "Top 10 customers by order total last month", and click **Send message** .

**Step 3:** Read the reply. It includes a **Proposed query** card with the SQL and a short reason for it.

**Step 4:** Click the action you want on the card:

- **Copy**  copies the SQL.
- **Apply** writes the SQL into the workspace's editor. The changed text stays tinted until you click in the editor.
- **Apply & run**  writes the SQL into the editor and runs it.

> **Info: What applying changes**
>
> - A proposal tagged **Spark SQL** switches the workspace to Spark SQL when you apply it.
> - An **Untitled** workspace takes the proposal's title as its name. The card says so before you apply it, for example `Apply renames “Untitled” to “Revenue by month”`.
> - A card with a **Chart, drawn once the query runs** section also sets the chart: once the query runs and returns rows, the results open on **Chart** with that chart. See [Apply a Proposed Chart](https://userguide.qualytics.io/explore/how-tos/explore-assistant/apply-a-proposed-chart/).
> - A card marked **Outdated** has been replaced by a newer proposal in the same chat.

*Last updated: November 23, 2026.*
