Skip to main content
Get Started
Product4 min

Meet the AI Query Assistant

By Tractorscope Team on July 23, 2026

Hit ⌘D in the chart editor and ask for what you want. The AI Query Assistant reads your current query, suggests a revision, and lets you apply and run it in one click.

Meet the AI Query Assistant

Hey there, data wizards! You know the moment. You've got a query that almost works. It pulls the right rows but the totals are off, or it's missing a join, or someone asks "can we see this by week instead of by day?" and you're suddenly staring at a wall of SQL trying to remember which CTE does what. We've all been there. So we built something to keep you company in that moment: the AI Query Assistant.

Press ⌘D and Just Ask

Open any chart's SQL editor and you'll see a new Query Assistant button — or skip the mouse entirely and hit

⌘D
. It's also in the global
⌘K
command menu, so you can jump straight there without hunting for the toolbar. A panel slides in from the right, and that's it. That's the whole onboarding.

Type what you want in plain English:

  • "Group this by week instead of by day"
  • "Add a filter for orders over $500"
  • "Why is this returning duplicate rows?"
  • "Join this with the customers table so I can see names"

Hit Enter to send,

Shift+Enter
if you want a new line. The assistant thinks for a beat and comes back with a syntax-highlighted query you can actually read before you commit to anything.

ai-query-assistant

It Already Knows What You're Working On

Here's the part that makes the difference. Most AI query tools treat every request like a blank page — you ask for a tweak and get back something unrelated to the query you spent twenty minutes on.

The Query Assistant sends your current query along with your request. So when you say "add a filter for last quarter," it's editing your SQL, not inventing a new one from scratch. The panel even tells you it's doing this: when you have a query open, the header reads "Working with your current query."

Want to start clean anyway? Just say so. Phrases like "new query", "start over", or "from scratch" tell it to drop the existing context and begin fresh. And if the conversation drifts somewhere unhelpful, the trash icon clears the whole thread so you can restart the discussion without leaving the editor.

tangled-sql

Three Buttons, Zero Surprises

Every suggestion comes with the same three choices, and none of them touch your data until you say so:

  • Apply & Run — drops the query into your editor, closes the panel, and executes it. The fast path when the suggestion looks right.
  • Apply Only — puts it in the editor and steps back. Use this when you want to eyeball it, tweak a column name, or run it on your own terms.
  • Copy — straight to your clipboard. Handy when you want to paste it somewhere else entirely.

Nothing is auto-applied. Nothing overwrites your work silently. You read the query, you decide.

It Follows Your Database

The assistant looks at which database the chart is connected to before it writes a line. You don't pick a dialect from a dropdown or tell it what you're running — it just matches the connection behind the chart you're editing, and the query comes back syntax-highlighted and ready to run.

query-wizardry

Who This Is Really For

If you write SQL every day, this is a speed-up: fewer trips to documentation, faster iterations on the annoying parts like window functions and date truncation.

If you don't write SQL every day — and plenty of people building dashboards don't — this is closer to a translator. You describe the answer you're after, you get a query that fetches it, and you can ask the assistant to explain what it wrote before you run it. That second part matters. Asking "what does this query actually do?" is a perfectly good use of the panel, and a much better habit than running SQL you don't understand.

Give It a Spin

Open a chart, hit

⌘D
, and ask it something messy. It pairs nicely with creating charts with AI — prompt your way to a first draft, then use the Query Assistant to refine the query behind it until the numbers are exactly right.

We're still tuning how it handles bigger schemas and gnarlier joins, so tell us where it shines and where it faceplants. Drop us a line or join the conversation on our forums — the rough edges you report are the ones we fix first.

Until next time, happy querying!

Related docs

Related posts

Radar Charts Are Here (And They're Pretty Sweet)

Radar charts are now available in Tractorscope for comparing multidimensional metrics, with support for multiple series and independent scales.