Coding
SQL from plain English
Gets you a query AND the paranoia — assumptions, edge cases and a safety check before you run it.
Write a SQL query: [WHAT YOU WANT, IN PLAIN ENGLISH] Schema (tables + relevant columns): [PASTE SCHEMA OR DESCRIBE IT] Dialect: [Postgres / MySQL / SQLite / BigQuery] Return: 1. The query, formatted and commented 2. Every assumption you made about my schema or data (nulls, duplicates, time zones) 3. What could make this query slow at scale, and the index that would fix it 4. If the query modifies data: the SELECT to run first to preview exactly what will change.
Works with Claude · ChatGPT · Gemini — replace the [bracketed] parts with your own details, keep the structure.
Want a new tested prompt every week? The PromptAI briefing delivers the AI story that matters, the paper everyone's citing and a prompt worth stealing — subscribe free →