Loading

Answer the ad-hoc data question

The query, the chart, and the plain-English answer.

10 minDataClaude Cowork
Loading

Set up

Try a plugin

The Data plugin ships with /write-query and other warehouse-and-BI skills as a starting point, already structured to read a data model and write queries against it. If your admin manages plugins and it's not available yet, skip this step. The prompt below works without it.

DataSkills for SQL generation, table profiling, dashboards, and charts
Add
/write-queryWrite SQL for your warehouse's dialect from a plain-language question, then offer to run it
Open in Claude
/explore-dataProfile a table and summarize what's in it
Open in Claude

Connect your tools

Claude is more powerful when it works directly with your systems. You control permissions and access. Learn about tool access.

Add a connector for each tool you want Claude to use.

Databricks
Read the semantic layer and run SQL against the lakehouse so the answer comes with the query.
Connect
Microsoft 365
Pull the stakeholder's question from Teams or email and write the answer back as a reply.
Connect
SnowflakeOptional
Query the warehouse directly when the answer isn't in the semantic model yet.
Connect

Set your working folder

Drag the files you'll use (your schema export or dbt models, your metrics library, your data dictionary) into one folder and give Claude access to it in the Claude desktop app. Claude reads the model from there and writes the SQL, the result table, and the answer memo back to it. If you field ad-hoc questions regularly, create a project from that folder so your naming conventions and certified-metric list stay attached.

Analytics / EMEA-margin-question
finance-schema.sqlApr 22, 2026312 KB
metrics-library.mdMar 30, 202618 KB
data-dictionary.xlsxFeb 14, 202662 KB
In Cowork’s chat bar:Analytics / EMEA-margin-question

The prompt

Copy this into Claude

Here's the question from the business: "Why is gross margin down in EMEA this quarter?" Write the SQL to answer it, run it against the warehouse, and tell me what's driving the move. Then give me the chart spec to add to the dashboard so nobody has to ask again.

Analytics / EMEA-margin-question

Why this works

Prompt

Paste the question verbatim. Using their exact words keeps the answer aimed at what they asked, in the terms they used.

Prompt

Ask for what's driving the number. "What's driving the move" is asking for the breakdown behind the number: which segment, which change, which date.

Prompt

Ask for a reusable output. "Chart spec to add to the dashboard" is asking for something the asker can refresh themselves next time.

Source

Let the working folder supply context. SQL is written against your tables and your metric names, not invented ones.

Get a better draft

Practice

Add an example to match. Drop an example you like into the folder and Claude matches your structure and voice.

Practice

Ask it to flag uncertainty. Add "flag anything you're not confident about" so you know where to look first when you review the draft.

Make Claude work for you

Tell Claude your own preferences for this task, such as your naming rules and your answer format, then save what you've done as a skill of your own. A few minutes of conversation and it runs with your standards from then on.

Make what we've done in this task so far into a skill called /adhoc-answer.

Analytics

Review the skill, and save it if Claude hasn't already.

Make it repeatable

Run it on every inbound question

The ad-hoc queue never stops. Ask Claude to set up a scheduled task, or open Scheduled in the sidebar, and /adhoc-answer runs on new questions in your analytics-requests channel and drafts the query and answer before you've even read the message.

Set up a scheduled task that runs every hour on weekdays: check #analytics-requests in Teams for new questions, run /adhoc-answer on each one, and write the draft answer to Analytics/Inbox/<thread-id>.md for me to review before it goes back.

Analytics
Scheduled taskActive
Ad-hoc analytics inbox

Hourly, reads new questions in #analytics-requests, runs /adhoc-answer against the warehouse, and writes a draft answer for review.

Every hour on weekdaysOpen in Claude

To use a folder on your computer during a scheduled task, keep your computer on and awake with the Claude desktop app open so Claude can access it.

Share with your teammates

Your /adhoc-answer skill now carries your warehouse model, your certified metrics, and your answer format. Share it so every analyst writes SQL against the same definitions, and the business gets the same number no matter who they ask.

What changes for the analytics queue