Review SQL safely
Review a query while preserving its business meaning.
What this starting point does
Review the supplied SQL for correctness and potential performance issues. This is an editable instruction template, not a claim of tested performance on a particular model.
Make the inputs yours
- Database engine and version — fill
{{DB_ENGINE}}with your own short description. This input is required for a filled prompt. - SQL query — fill
{{SQL_CODE}}with your own material, preserving line breaks where useful. This input is required for a filled prompt.
Reusable template
## Task
Review the supplied SQL for correctness and potential performance issues.
## Context
Database engine and version: {{DB_ENGINE}}
## Constraints
- Preserve existing business logic.
- Do not assume undocumented relationships or indexes.
- Tie recommendations to the specified database engine.
## Output format
Summary, findings with evidence, open questions, and verification queries
## Reference material
<source_material>
{{SQL_CODE}}
</source_material>A filled example
This example uses fictional demonstration material. It is an example prompt, not a generated answer or image.
## Task Review the supplied SQL for correctness and potential performance issues. ## Context Database engine and version: PostgreSQL; confirm the target version before recommending engine-specific changes. ## Constraints - Preserve existing business logic. - Do not assume undocumented relationships or indexes. - Tie recommendations to the specified database engine. ## Output format Summary, findings with evidence, open questions, and verification queries ## Reference material <source_material> SELECT customer_id, COUNT(*) AS order_count FROM orders GROUP BY customer_id; </source_material>
Before using it
Review every instruction and replace the example material. Check that its constraints fit your task. The structural Analyzer can flag specific issues, but cannot verify facts or guarantee the quality of a model’s response.
Customize this template