sql-queries

Generate dialect-specific SQL queries for major data warehouses.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jbreel77888/Agent-AiNorx --skill sql-queries-jbreel77888
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-queries
Source: https://github.com/jbreel77888/Agent-AiNorx/tree/main/.kortix/opencode/skills/GENERAL-KNOWLEDGE-WORKER/sql-queries
Command: npx skills add https://github.com/jbreel77888/Agent-AiNorx --skill sql-queries-jbreel77888

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing SQL that works consistently across different data warehouse platforms is time-consuming and error-prone, as each dialect has unique syntax for common operations like date manipulation, string functions, and JSON handling. This Skill eliminates that friction by providing centralized, dialect-specific reference material and pre-built common query patterns.

Core Features & Use Cases

  • Dialect-Specific Syntax References: Complete cheat sheets for 5 major data warehouses covering date/time operations, string functions, JSON/array handling, and platform-specific performance best practices.
  • Pre-Built Common Patterns: Ready-to-use templates for high-frequency analytical tasks including window functions, CTE-based readable queries, cohort retention analysis, funnel analysis, and record deduplication.
  • Error Handling Guidance: Step-by-step troubleshooting for common SQL failures like syntax errors, type mismatches, ambiguous columns, and division by zero.
  • Use Case Example: A data analyst building a monthly retention report for their Snowflake data warehouse can use this Skill to write a compatible cohort query in minutes instead of manually looking up Snowflake-specific date truncation and join syntax.

Quick Start

Use the sql-queries skill to write a performant cohort retention query compatible with your company's Snowflake data warehouse.

Frequently Asked Questions about sql-queries

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

FAQPage Schema
How do I write a cohort retention query for Snowflake without syntax errors?

Use pre-built analytical query templates that apply dialect-specific date truncation and join syntax to generate a Snowflake cohort retention query. This prevents manual syntax lookups and avoids runtime errors during cross-platform data warehouse operations.

What is the best way to optimize SQL queries across BigQuery and PostgreSQL?

The best way to optimize SQL queries across BigQuery and PostgreSQL is to reference platform-specific performance best practices and dialect-specific syntax cheat sheets. This ensures accurate query structure and high-performance execution for each data warehouse environment.

Does this SQL query generator support semi-structured JSON data handling?

Yes, this SQL query generator supports semi-structured JSON data handling by providing dialect-specific syntax references for JSON and array manipulation. It generates compatible queries for major data warehouses including BigQuery and Snowflake.

How do I troubleshoot a division by zero or type mismatch error in my data warehouse query?

Troubleshoot division by zero or type mismatch errors in your data warehouse query by following step-by-step error handling guidance. These instructions resolve common SQL failures like ambiguous columns and syntax errors across multiple data warehouse dialects.

Can I use pre-built SQL templates for funnel analysis in my data warehouse?

Yes, you can use pre-built SQL templates for funnel analysis in your data warehouse. These templates provide ready-to-use query patterns for high-frequency analytical tasks, significantly reducing development time for business intelligence workflows.

When should I use CTE-based readable queries instead of standard SQL joins?

Use CTE-based readable queries instead of standard SQL joins when building complex analytical patterns like window functions or record deduplication. CTEs provide reusable query templates that improve readability and reduce development time across different data warehouse dialects.