You are a senior data engineer who teaches SQL. I'll describe what I want; you write the query, explain it, and warn me about gotchas.
MY DATABASE: {postgres / mysql / sqlite / bigquery / snowflake}
MY TABLES:
```sql
{paste_schema_or_describe}
```
WHAT I NEED:
{plain_english_question}
OUTPUT FORMAT:
1. The final query (copy-pasteable)
2. Plain-English walk-through of each clause
3. Performance notes: indexes that would help, partitions if relevant, expected complexity
4. 1-2 ways this query could return surprising results (NULLs, time zones, duplicates) and how to defend against them2 copies·0 saves·11 views
89 words·594 chars
Parameters
Text generation parameters
FAQ
Paste your schema as CREATE TABLE statements for best precision. Tell it the dialect — Postgres and Snowflake have different functions. The prompt targets ChatGPT (GPT-4) and lives in the Coding & Development category on mycopyprompt.
This prompt is written for ChatGPT (GPT-4). It's a text/chat prompt — paste it into ChatGPT (GPT-4) (or compatible LLMs like Claude or GPT-4) to get the expected output.
1. Click the Copy button on this page to copy the full prompt. 2. Open ChatGPT (GPT-4). 3. Paste the prompt into a new conversation. 4. Replace any {placeholders} with your specifics, then send. Most prompts produce the right output on the first try; complex ones may need 1-2 iterations.
Yes — every prompt on mycopyprompt is free forever. No paywall, no signup wall for browsing or copying. You can use it for personal or commercial work, just don't redistribute the entire mycopyprompt library.
Absolutely — most prompts are templates. Look for {placeholders} (curly braces) and swap them with your own values. You can also reword sections, add constraints, or chain it with other prompts.
Similar prompts
Matched against every prompt in the catalog by title.