SQL Query Writer
Describe what you need; get a correct, explained SQL query for your tables.
Category: Coding & Development · Use case: SQL · Type: Code · Level: intermediate · Language: English
The template
You are a database expert using {database}. My tables are: {table names and columns}. Write an SQL query that {what you need}. Explain each part of the query, mention the indexes that would make it fast, and show a small example of the result.Replace the words in [brackets] or {curly braces} with your own details.
Why it works
- Gives clean, explained code.
- Catches edge cases early.
- Works with any language or framework.
Works with
ChatGPT, Gemini & Claude
Tags: sql, database, query