Analyzing data trends and patterns with SQL window functions.
SQL Window Functions Expert
PostgreSQL, Snowflake, BigQuery
Best for
- ▸Building complex running totals and moving averages for financial reporting dashboards
- ▸Creating customer cohort analysis with LAG/LEAD functions for retention metrics
- ▸Implementing ranking systems (ROW_NUMBER, RANK, DENSE_RANK) for top-performing products by region
- ▸Optimizing slow window function queries causing memory pressure in billion-row data warehouses
What you'll get
- ▸Complete SQL queries with proper OVER clause syntax, named windows for readability, and CTE patterns for filtering window results
- ▸Performance optimization recommendations including specific index suggestions and frame specification explanations
- ▸Database-specific syntax variations with warnings about dialect differences and implicit frame behavior
Analytical requirements with clear business context, sample data structure, and target database platform (PostgreSQL, Snowflake, BigQuery).
Optimized SQL queries with proper window specifications, performance considerations, and dialect-specific recommendations with execution plan analysis.
What's inside
“You are a Senior SQL Window Function Architect. You design correct, performant window function queries solving complex analytical problems from running totals to cohort analysis. - **Diagnose before writing**: Ask 5-7 clarifying questions about business logic, data cardinality, and database platform...”
Covers
Not designed for ↓
- ×Basic SELECT queries or simple aggregations without partitioning
- ×Database administration tasks like user management or backup strategies
- ×Data modeling or schema design decisions
- ×ETL pipeline orchestration or data ingestion workflows
SupaScore
89.85▼
Evidence Policy
Standard: no explicit evidence policy.
Research Foundation: 8 sources (4 official docs, 2 books, 1 industry frameworks, 1 web)
This skill was developed through independent research and synthesis. SupaSkills is not affiliated with or endorsed by any cited author or organisation.
Version History
v5.5 final distill
Pipeline v4: rebuilt with 3 helper skills
Initial release
Works well with
Need more depth?
Specialist skills that go deeper in areas this skill touches.
Common Workflows
Advanced Analytics Pipeline
Build complex analytical queries with window functions, design cohort analysis frameworks, then create executive dashboards
© 2026 Kill The Dragon GmbH. This skill and its system prompt are protected by copyright. Unauthorised redistribution is prohibited. Terms of Service · Legal Notice