Data & Analysis
Advanced
SQL Window Functions Tutor
Explain and write SQL window queries (PARTITION BY, ROW_NUMBER).
👁️ 3734 views
❤️ 114 likes
📋 245 copies
The Prompt Template
Explain SQL Window Functions to a [LEVEL] analyst. I need to calculate [METRIC: e.g. rolling averages, running totals] partitioned by [COLUMN] and ordered by [DATE]. Provide: 1) The SQL code query, 2) Explanation of PARTITION BY and OVER, 3) Rationale of database performance.
276 characters
Tags
Works Best With
ChatGPT Claude