# Fix a Failed Query

Source: https://userguide.qualytics.io/explore/how-tos/explore-assistant/fix-a-failed-query/

When a query fails, hand the error to the Explore Assistant and apply the fixed query it proposes.

> **Info: Related**
>
> - Concept: [Explore Assistant](https://userguide.qualytics.io/explore/deep-dive/explore-assistant/) for what the assistant receives.
> - [Apply a Proposed Query](https://userguide.qualytics.io/explore/how-tos/explore-assistant/apply-a-proposed-query/) for the proposal card's actions.
> - [FAQ](https://userguide.qualytics.io/explore/faq/) for common query errors.

> **Note: Before you start**
>
> **Fix with AgentQ** shows only when AgentQ is set up for your organization with a data level above **Nothing about your data**, and on screens wide enough to dock the Explore Assistant. The error details reach the assistant only when the AgentQ data level allows it. See [AgentQ Access Controls](https://userguide.qualytics.io/agentq/deep-dive/access-controls/).

**Step 1:** Run the query. When it fails, the results show the error with **Copy error**  and **Fix with AgentQ** .

**Step 2:** Click **Fix with AgentQ** . The request goes to the Explore Assistant panel beside the workspace.

**Step 3:** Read the reply. It includes a **Proposed query** card with the corrected SQL.

**Step 4:** Click **Apply & run**  on the card to replace the SQL in the editor and run it. To review it first, click **Apply**, then run it yourself.

*Last updated: November 24, 2026.*
