HOW-TO · ASK PANEL

Ask Claude about your database.

By Chris Davidson, founder of yForest · Updated September 26, 2026

Add your own Anthropic key, open the Ask panel, and get a plain-English answer with the SQL that produced it, grounded in your actual schema.

Start 14-day free trial Download on theMac App Store

No credit card. 14 days. Cancel in one click.

macOS 15+ · Apple Silicon native · 14-day free trial · No credit card

Quick answer: Go to Settings → AI Assistant and paste in an Anthropic API key. Open the SQL Editor and click Ask, or press ⌘L. Type a question, optionally attaching the current query, a selection, or the last error. Claude answers in one sentence plus the SQL underneath, which you can insert, run, or watch.

Before you start

You'll need an Anthropic API key (get one at console.anthropic.com if you don't have one) and at least one working database connection. Any tier works; Ask depends on the key you add, not on which subscription tier you're on.

Step by step

  1. Go to Settings → AI Assistant and paste your key into Anthropic API Key.
  2. In the SQL Editor, click Ask (or press ⌘L).
  3. Type a question. Optionally attach Current query, Selection, or Last error.
  4. Read the one-sentence answer and the SQL underneath it.
  5. On any SQL Claude writes, use Insert into editor, Run, or Watch this.

A worked example

On a Postgres connection for a support ticketing app, ask: "write a query for daily row counts over the last 30 days in tickets." A reasonable answer:

SELECT date_trunc('day', created_at)::date AS day,
       count(*) AS tickets_created
FROM public.tickets
WHERE created_at >= current_date - interval '30 days'
GROUP BY 1
ORDER BY 1;

Click Run to see it against your real data, or Insert into editor if you want to modify it first.

Check it worked

The panel returns a one-sentence answer plus the SQL it ran, and step cards showing which tables and columns it checked along the way. If those look right and the numbers match what you'd expect, you're set.

Troubleshooting

If you seeFix
"Add an Anthropic API key in Settings"You haven't pasted a key yet. Go to Settings → AI Assistant.
An answer that references a table that doesn't existRare, but possible on a very large schema. Attach Current query or rephrase with the real table name.
The panel seems to hangCheck your internet connection; Ask needs connectivity to the model provider's API even though the query itself runs locally against your database.
SQL that runs but returns nothingUsually a filter that's too narrow, like a date range with no data in it yet. Ask a follow-up to loosen it.

Other prompts worth trying

"What tables are in this dataset, and what do they look like" is a good first question on any new connection. "Why did my last query fail" works best with Last error attached. Once you have an answer you trust, thumbs-up it so it becomes a verified query the panel can reuse.

Attaching context instead of describing it

Typing out an error message from memory loses detail. Attaching Last error hands the panel the exact text Postgres, Snowflake, or whichever database you're on actually returned, which tends to produce a more specific fix than a paraphrased description of the same failure would.

A second worked example: fixing a broken query

Say a Snowflake query fails with SQL compilation error: Object 'ORDERS' does not exist because the table is actually named orders and the connection's default schema wasn't set. Attach Last error and ask what happened; the panel checks the schema, finds the case mismatch and the missing schema qualifier, and offers analytics.public.orders as the corrected reference along with an explanation of why the original failed.

Reading the step cards

Expand a step card to see exactly which table or column the panel checked at that point, and, for a result-based question, which prior rows it read. On a schema with a lot of similarly named tables, this is the fastest way to confirm it picked the one you meant rather than a near-duplicate from an older migration.

Following up instead of starting over

If the first answer is close but not quite right, say so directly, "that's right except I only want orders from the last 7 days," rather than retyping the whole question. The panel keeps the schema context and the prior query, so a follow-up is usually a small edit, not a fresh exploration.

What this tutorial doesn't cover

Watching the query for changes over time is a separate step, covered in how Watch This works. Scheduling it to run every morning is covered in the scheduler tutorials. This tutorial is just getting a trustworthy answer once.

QueryFlow Studio $9.99/mo · $99/yr
QueryFlow Pipelines $29.99/mo · $199.99/yr

Frequently asked

Do I need a specific tier for this?

No, Ask is available on Studio and above. You do need your own Anthropic API key, added once in Settings.

Can I use a different model instead of Claude?

Yes. The panel supports GPT-6 Sol, GPT-6 Luna, Gemini 3.5 Flash, Flash-Lite, and Grok 4.20 as well, each on its own key. This tutorial uses Claude since it's the default and the one the Settings tab is named for.

What if Claude gets the query wrong?

Check the SQL it wrote before running it, the same as any query you'd write yourself. If it's off, tell it what's wrong in a follow-up rather than starting over, the panel keeps the schema context from the first question.

Can I ask about a table I haven't queried before?

Yes. The panel explores the schema itself when it needs to; you don't have to prime it with table names first.

Does this work on every connection type?

Yes, across all nine connectors, Snowflake, Redshift, Postgres, MySQL, BigQuery, Databricks, Salesforce, Google Sheets, and CSV/Excel.

Ask it something real.

14-day free trial, no card. Add a key and try it on your own schema.

Start 14-day free trial

No credit card. 14 days. Cancel in one click.