sql-queries

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

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/Srujan0798/NRG --skill sql-queries-srujan0798
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-queries
Source: https://github.com/Srujan0798/NRG/tree/main/.agents/skills/sql-queries
Command: npx skills add https://github.com/Srujan0798/NRG --skill sql-queries-srujan0798

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Translate between dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.)
  • Optimize slow queries and suggest improvements
  • Build complex analytics with CTEs, window functions, or aggregations

Quick Start

Generate a correct, optimized SQL query across Snowflake, BigQuery, PostgreSQL, or Redshift from a user specification.

Frequently Asked Questions about sql-queries

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

FAQPage Schema
How do I write cross-dialect SQL queries for multiple data warehouses?

To write cross-dialect SQL, the system translates analytical query requirements into correct syntax for target warehouses like Snowflake, BigQuery, Databricks, and PostgreSQL. It validates schema hints to generate production-ready SQL.

How can I optimize slow SQL queries using CTEs and window functions?

You can optimize slow SQL by applying Common Table Expressions and window functions to structure complex analytics efficiently. The system analyzes query logic and suggests improvements for performant execution across dev and prod environments.

What is the best way to translate SQL between PostgreSQL and Snowflake dialects?

The best way to translate SQL between PostgreSQL and Snowflake is using dialect-specific references to adjust syntax variations. The system maps analytical logic to the target dialect and validates value synonyms for accurate cross-platform translation.

Does this SQL generation approach support complex aggregations for BigQuery?

Yes, this SQL generation approach supports complex aggregations for BigQuery. It builds advanced analytics by combining aggregations with CTEs and window functions, relying on schema hints to validate and produce correct queries for your environment.

Why does my translated SQL query fail when moving from Databricks to Redshift?

Translated SQL queries often fail when moving from Databricks to Redshift due to unsupported dialect-specific functions or syntax differences. The system prevents this by validating against dialect-specific references and adjusting value synonyms for the target warehouse.