Advanced
sql
database
Write an SQL query
Query data correctly. Tuned for Claude.
Prompt
Write an SQL query for [DATABASE] that [GOAL]. Tables: [SCHEMA]. Explain the query and suggest an index. Ask clarifying questions first if anything important is missing.
Replace the [HIGHLIGHTED] parts with your own details.
Example output
A query with joins, grouping and an index tip.
Tips
- Give table and column names exactly.
