SQL prompts

SQL prompts work best when you share the schema and the question. These prompts help you write and explain queries, optimise slow ones, design tables and relationships, plan reporting queries, practise for interviews and review SQL for errors and risks. Provide table names, columns and the database you use, but not real data or credentials. Always read and test generated SQL on a copy or read-only environment before running it, especially anything that updates or deletes data. Learners can use the explanation prompts to understand why a query works, not only to copy the answer.

Prompts