Skip to main content
When the AI modifies your SQL query, it writes the change straight into your draft query. The editor highlights what changed as a diff against your last saved query, so you can review before publishing.

How it works

  1. You ask the AI to change your query (e.g. “add a WHERE clause for active users”).
  2. The AI writes the updated SQL into your draft.
  3. The editor shows a diff against your saved query, additions in green, removals in red.
  4. You review (and tweak) the draft, then save to publish.

Keeping changes

Edit the draft further if you want, then save (Cmd+S) to publish. Saving promotes the draft to your saved query and the diff clears.

Discarding changes

To undo AI changes you don’t want, edit the draft back (standard Cmd+Z undo works) or re-run the query. Nothing is published until you save.

When the diff appears

The editor shows the diff for any unsaved change, whether made by you or the AI:
  • Fixing errors after “Send to chat.”
  • Adding columns, filters, or joins.
  • Optimizing or rewriting queries.
  • Any change requested in the chat.
This way you always see exactly what changed since your last save.