Task prompt · Data

Write SQL to answer a business question

by Agent Yard Team

From a question to a query that runs.

You'll attach

Text only

Works with

ChatGPTClaudeGeminiGrokCopilotGrok Bot

Use cases

  • From a question to a query that runs.
  • Reuse it as often as you like: fill in the blanks (tables and columns; business question; database) with new details and copy again.
  • With ChatGPT, Claude, Gemini and more, the AIs that support what this prompt needs.

How to use it

  1. Open chatgpt.com or claude.ai (or another AI listed here).
  2. Fill in the highlighted blanks ([TABLES AND COLUMNS], [BUSINESS QUESTION], [DATABASE]) below, or edit them after pasting.
  3. Copy the prompt, paste it into the chat and send.

Fill in the blanks (optional)

Prompt

Remix
My database has these tables: [TABLES AND COLUMNS]. Question: [BUSINESS QUESTION].
Write a [DATABASE] query, explain it, and list assumptions about what the question means (e.g. how "active customer" is defined). Add a quick check query to validate the result.
One email a week

The best new prompts and personas, nothing else.

The Weekly is presented byyour brandSponsored · open

More Data prompts

Footer partner · openThis strip runs at the foot of every page. One partner at a time.Ask about it →