Back to prompts
Create a SQL query review checklist for this team and stack: Database: [POSTGRES / MYSQL / BIGQUERY / SNOWFLAKE] Typical query types: [REPORTING / ETL / APP / AD HOC] Data sensitivity: [PII / FINANCIAL / PUBLIC] Performance SLOs: [LATENCY OR COST LIMITS] Existing standards: [PASTE OR NONE] Team size: [SIZE] Requirements: 1. Cover correctness, readability, indexes, joins, filters, and null handling. 2. Add security checks (least privilege columns, no secrets in comments, PII redaction). 3. Include performance smells (SELECT *, unbounded scans, nested loops risk). 4. Make items yes/no with a short "why it matters" note. 5. Keep it usable as a PR template comment. Deliverables: 1. A prioritized checklist grouped by Correctness, Performance, Security, Maintainability. 2. Three example bad-query snippets with a safer rewrite. 3. A 5-item "fast path" for tiny one-off queries.
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.