sql-queries

Automates writing, translating, and optimizing SQL across major warehouse dialects.

4|4|Updated Dec 15, 2024
One-click install
npx skills add https://github.com/adrianliechti/wingman-chat --skill sql-queries-adrianliechti
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-queries
Source: https://github.com/adrianliechti/wingman-chat/tree/main/skills/data/sql-queries
Command: npx skills add https://github.com/adrianliechti/wingman-chat --skill sql-queries-adrianliechti

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Dialect-specific references for PostgreSQL, Snowflake, BigQuery, Redshift, Databricks SQL
  • Common patterns including window functions, CTEs, aggregations, and JSON/arrays
  • Use cases cover translating between dialects and optimizing slow queries in analytics workloads

Quick Start

Translate a sample query into your target dialect and optimize it for performance.

Frequently Asked Questions about sql-queries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write SQL queries that work correctly across different data warehouse dialects?

To write cross-dialect SQL correctly, you need dialect-specific syntax references for platforms like Snowflake, BigQuery, Databricks, and PostgreSQL. This Skill automates that translation process, handling complex patterns including CTEs, window functions, and JSON or array operations.

What is the best way to translate PostgreSQL queries to Snowflake?

Translating PostgreSQL queries to Snowflake requires mapping dialect-specific syntax and functions. This Skill automates cross-dialect SQL translation by enforcing platform-specific references, ensuring analytical workloads maintain correct syntax for CTEs, window functions, and aggregations.

How do I optimize slow SQL queries in BigQuery or Databricks?

Optimizing slow SQL queries in BigQuery or Databricks involves applying performance tuning best practices to analytical workloads. This Skill provides guidance on query optimization, handling complex structures like CTEs and window functions to improve execution speed.

Does this Skill support handling JSON and array data in data warehouse queries?

Yes, handling JSON and array data is supported across major data warehouses. The Skill applies dialect-specific syntax references for parsing and manipulating these data types within complex analytical queries on platforms like Snowflake, BigQuery, and PostgreSQL.

Can I use this to fix SQL syntax errors when switching between Redshift and BigQuery?

Yes, you can fix cross-dialect SQL syntax errors when switching between Redshift and BigQuery. The Skill enforces dialect-specific syntax references and provides error handling guidance to ensure your analytical queries comply with the target platform's requirements.