Back to Skills

sql-queries

Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.). Use when writing queries, optimizing slow SQL, translating between dialects, or building complex analytical queries with CTEs, window functions, or aggregations.

17,345stars2,021forksUpdated 5/28/2026

Security Assessment

Safe(100/100)
Security Score100/100

About sql-queries

The SQL Queries skill enables users to write accurate, efficient, and readable SQL statements across a variety of major data warehouse platforms, including PostgreSQL, Snowflake, BigQuery, and Databricks. It helps solve challenges associated with writing complex queries, optimizing performance, and translating SQL syntax between different dialects. By providing guidance on best practices for query formulation and optimization, this skill ensures that database operations are both correct and performant, which is crucial for analytics, reporting, and data-driven decision-making.

This skill offers a wide range of capabilities tailored to each supported dialect. For PostgreSQL, it covers date and time manipulation, string functions, array and JSON handling, and performance optimization tips such as using indexes and analyzing query plans. Snowflake support includes date/time operations, string and JSON parsing, semi-structured data handling with VARIANT types, and performance advice for clustering keys and warehouse sizing. BigQuery guidance emphasizes date and timestamp arithmetic, string and array functions, and formatting operations. Across all dialects, users can leverage complex SQL features such as CTEs, window functions, aggregations, and lateral flattening for nested structures.

This skill is ideal for data engineers, analysts, and developers who work with large datasets and multiple data warehouses. It is useful for writing new queries, optimizing slow-performing SQL, translating queries between different dialects, and building sophisticated analytical queries for reporting and business intelligence. Organizations that rely on cross-platform data analysis, database optimization, or automated reporting workflows will find this skill particularly valuable for improving productivity and ensuring consistency in SQL usage.

FAQ

Which data warehouse platforms are supported?

The skill supports major platforms including PostgreSQL (and derivatives like Aurora, RDS, Supabase, Neon), Snowflake, BigQuery, and Databricks.

Can this skill help optimize slow SQL queries?

Yes, it provides performance tips for each dialect, such as using indexes, clustering keys, partial indexes, and query profiling techniques.

Does it handle complex queries with CTEs and window functions?

Yes, it is designed to assist with building complex analytical queries including CTEs, window functions, and aggregations.

Is the skill suitable for translating queries between SQL dialects?

Yes, it offers guidance for syntax differences and functions across multiple SQL dialects, facilitating translation and cross-platform usage.

Are there any limitations or requirements?

The skill requires familiarity with SQL concepts and assumes access to the respective data warehouse environments. It does not provide direct database connections or execute queries.

Install sql-queries

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill