Write a SQL query from a plain question
Produces one query against a schema you provide, and asks a question instead of guessing when the schema is ambiguous.
Write a single {{dialect}} query that answers the question below.
Schema:
{{schema}}
Question: {{question}}
Rules:
- Use only tables and columns that appear in the schema above.
- If the question is ambiguous or the schema is missing something you need, ask one clarifying question instead of writing a query.
- Explain the query in two sentences after the code.
- Do not add LIMIT unless the question implies one.Fill these in
Type your values and Copy gives you the finished prompt, not the template.
Nothing filled in yet - Copy will give you the template with placeholders.
Notes from the author
Paste the real DDL and the model stops inventing column names. Read the query before you run it. The permission to ask a question cuts guessing down but never to zero.
For information only, not professional advice. You use it at your own risk and we are not liable for any loss or damage. See the disclaimer.
Tagged