Business & Strategy

SQL Query Writing

Write SQL queries for business questions

The prompt

Write a SQL query to answer the business question I describe. Explain your approach, handle edge cases, optimize for performance if dealing with large tables, and show me how to verify the results are correct.

How to use it

Copy the prompt, paste it into ChatGPT, Claude, Gemini or Perplexity, and replace anything in brackets with your own details. The more context you add about your situation, the better the answer.

  • sql
  • database
  • intermediate
See all 300 prompts in Business & Strategy

Want prompts like these built into how your team works?

DAPT builds custom AI tools and trains your team to run them. Tell us what you're doing by hand.

Book a call