sql-queries

Translate and optimize SQL across Snowflake, BigQuery, Databricks, PostgreSQL, and Redshift.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/chelleboyer/reachy_mini_retail_assistant --skill sql-queries-chelleboyer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-queries
Source: https://github.com/chelleboyer/reachy_mini_retail_assistant/tree/main/skills/data/skills/sql-queries
Command: npx skills add https://github.com/chelleboyer/reachy_mini_retail_assistant --skill sql-queries-chelleboyer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Translate and optimize SQL across major dialects to ensure correctness and performance.

Core Features & Use Cases

  • Cross-dialect SQL reference and translation patterns for date/time, strings, arrays, and JSON across Snowflake, BigQuery, Databricks, PostgreSQL, and Redshift.
  • Performance optimization guidance including safe patterns, avoiding common pitfalls like SELECT * and non-partition-filtered scans, plus cost-aware query design.
  • Practical templates for analytics tasks such as building robust window functions, CTEs, rankings, and cohort analyses across engines.
  • Use Case: A data engineer converts a complex PostgreSQL query with multiple CTEs into Snowflake syntax while preserving results and performance.

Quick Start

Convert a PostgreSQL query with window functions to another dialect using the provided templates to see dialect-aware results.

Frequently Asked Questions about sql-queries

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

FAQPage Schema
How do I translate SQL queries from PostgreSQL to Snowflake?

SQL query translation from PostgreSQL to Snowflake uses cross-dialect patterns for date/time, strings, arrays, and JSON to preserve window functions and CTEs while ensuring accurate results.

What is the best way to optimize SQL queries for BigQuery and Redshift?

SQL optimization for BigQuery and Redshift involves cost-aware query design that avoids SELECT * and non-partition-filtered scans to ensure cost-conscious execution across engines.

Does this approach support cross-dialect window functions and CTEs?

Cross-dialect SQL translation supports window functions and CTEs through practical templates for rankings and cohort analyses across Snowflake, BigQuery, Databricks, PostgreSQL, and Redshift.

How do I convert complex PostgreSQL CTEs into Databricks syntax?

Converting complex PostgreSQL CTEs into Databricks syntax requires dialect-specific reference templates to map structural differences while maintaining query correctness and performance.

Why should I avoid SELECT * in cross-engine SQL queries?

Avoiding SELECT * in cross-engine SQL queries is a performance optimization safeguard because unprojected columns trigger unnecessary data scans, increasing compute costs and degrading execution speed.

When do I need dialect-specific syntax for JSON and ARRAY handling?

Dialect-specific syntax for JSON and ARRAY handling is required when translating data analytics workflows across Snowflake, BigQuery, Databricks, PostgreSQL, and Redshift to ensure correct data parsing.