Fill fields, review the preview, then copy or open elsewhere.
Leave a field empty to keep its placeholder in the preview.
Write a SQL query for the following.
Database: {{db_flavor}}
Goal: {{question}}
Schema:
{{schema}}
Return:
1. The query (well-formatted)
2. A short explanation of what it does
3. Performance notes if applicable (indexes that would help, etc.)