Skip to content
New this week26 prompts for Sora, Veo and Runway video workflows.
Explore video prompts→
AIPrompt123Prompt library

Search AIPrompt123

Search prompts, categories, platforms and repositories

Data AnalysisIntermediate

Write a SQL window function explanation

This copy-ready data analysis prompt helps you write a SQL window function explanation with fewer blank-page decisions. Paste it into DeepSeek and ChatGPT, fill the variables, and you get a structured first draft you can edit. It is written for repeatable results and tells you what to check before publishing.

4.9(55 ratings)261 copies
Updated By Author
41 words · v1.2

Fill in the blanks · 1 variable

DeepSeek promptReplace every highlighted token before sending
Explain this SQL window function query line by line, including the partition, order and frame. Then give a simpler alternative if one exists and a case where the window function is the better choice. Point out any null-handling bug.

Query:
{query}

---
Platform note: Reason through the problem first, then output only the final answer in the requested structure. Add a short list of assumptions at the end.
Open in DeepSeek

Comments

Share what worked, what broke and which model you used. Comments appear after posting and are moderated for spam.

Saved with an anonymous browser ID. No login needed.

How to use this prompt

  1. 1

    Open DeepSeek and start a new chat. Paste the prompt exactly as written.

  2. 2

    Replace each placeholder ({query}) with your own details. Leave the instructions and the output format untouched.

  3. 3

    Add one concrete example or data point if the model's first answer is vague. Specific input produces specific output.

  4. 4

    Run it once, then ask for a single revision with a specific critique rather than regenerating from scratch.

  5. 5

    Review the result. Reconcile totals to a trusted source, verify the query and review the statistical claim with an analyst.

Worked example

This is the kind of input the prompt expects and the shape of output it produces. Your result will differ with the model and the details you supply.

Example input

Query: Paste the SQL query here.

Example output

**Finding:** activation within 7 days predicts 90-day retention, but the effect is concentrated in self-serve signups. **Method:** cohort by signup month, activation defined as completing two core actions within 7 days, retention measured on day 90. Excludes internal accounts and trials. **Caveat:** sales-assisted accounts are small and may be underpowered. This is correlational, not causal. **Sanity check:** total users reconcile to the billing table within 0.4%.

Tips for a better result

  • Give the schema and the metric definition before asking for an interpretation.
  • Ask for the query or code so you can rerun it and check a known total.
  • Require a 'what this cannot tell us' section to surface confounders.
  • Change one variable at a time and compare the outputs; it is the fastest way to learn what this model responds to.

Common mistakes

  • Trusting a percentage without checking the denominator or sample size.
  • Treating correlation as causation in a retention or revenue analysis.
  • Letting the model invent a result for data it was not given.
Verified Knowledge · FAQ

Questions about this prompt

Practical answers about running the write a sql window function explanation prompt.

Related prompts

Same job, a different angle — or the next step in the workflow.

Analyse a survey without overclaiming

A data analysis prompt for analyse a survey without overclaiming. It gives ChatGPT and Claude a clear role, explicit constraints and a defined output, so the first answer is closer to usable. Fill in the variables, run it once, then use the verification notes on this page to review the result.

ChatGPTClaudeDeepSeek
4.7(56)290 copies
Data Analysis
Intermediate

Write a reproducibility checklist

A data analysis prompt for write a reproducibility checklist. It gives Claude and ChatGPT a clear role, explicit constraints and a defined output, so the first answer is closer to usable. Fill in the variables, run it once, then use the verification notes on this page to review the result.

ClaudeChatGPT
4.9(76)226 copies

Choose the right chart for the question

Choose the right chart for the question with a prompt built for ChatGPT and Claude. It supplies context, constraints and an output contract, then asks the model to surface assumptions and gaps. Copy it, fill the variables and treat the result as a structured draft, not a final answer.

ChatGPTClaude
4.7(62)216 copies

Written and reviewed by Author

AIPrompt123 Contributor

Contributing author and prompt engineer at AIPrompt123.

Last reviewed 12 May 2026 · version 1.2 · tested on DeepSeek, ChatGPT