sql-queries

Installation
Summary

Write correct, performant SQL across all major data warehouse dialects.

  • Covers five major dialects: PostgreSQL, Snowflake, BigQuery, Redshift, and Databricks with dialect-specific syntax for date/time, string functions, arrays, and JSON handling
  • Includes common analytical patterns: window functions, CTEs, cohort retention, funnel analysis, and deduplication with ready-to-use examples
  • Provides performance optimization tips per dialect, such as clustering keys in Snowflake, partition pruning in BigQuery, and distribution keys in Redshift
  • Covers error handling for syntax mismatches, type casting, division by zero, and GROUP BY edge cases across dialects
SKILL.md

SQL Queries Skill

Write correct, performant, readable SQL across all major data warehouse dialects.

Dialect-Specific Reference

PostgreSQL (including Aurora, RDS, Supabase, Neon)

Date/time:

-- Current date/time
CURRENT_DATE, CURRENT_TIMESTAMP, NOW()

-- Date arithmetic
date_column + INTERVAL '7 days'
date_column - INTERVAL '1 month'

-- Truncate to period
DATE_TRUNC('month', created_at)
Related skills

More from anthropics/knowledge-work-plugins

Installs
1.9K
GitHub Stars
12.0K
First Seen
Jan 31, 2026