SQL Patterns

Best-practice SQL for analytical workloads — window functions, CTEs, query optimization, partitioning strategies, and anti-patterns to avoid. Use this skill whenever the user is writing or reviewing a SQL query that goes beyond a basic SELECT, especially on BigQuery, Snowflake, Redshift, or DuckDB. Trigger on mentions of aggregations, ranking, running totals, session analysis, lag/lead comparisons, deduplication, slowly-changing lookups, or any time the user asks "how do I write a query for X". Also trigger when a query looks slow, returns wrong results, or the user asks for a code review of existing SQL.

Methasit-Pun a588e53 6.1 KB Updated

File contents

Methasit-Pun/data_engineer_claude_skills/tree/main/03-modeling/sql-patterns commit a588e53512

Frequently asked questions

npx skillmds@latest add methasit-pun/sql-patterns