sql-queries

Generate SQL queries across PostgreSQL, Snowflake, BigQuery, Redshift, and Databricks SQL.

1|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/juandaniel190/personal-projects --skill sql-queries-juandaniel190
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-queries
Source: https://github.com/juandaniel190/personal-projects/tree/main/.claude/.claude_backup/skills/data/data-sql-queries
Command: npx skills add https://github.com/juandaniel190/personal-projects --skill sql-queries-juandaniel190

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write correct, performant, and readable SQL queries across various data warehouse dialects, optimizing query performance and simplifying complex analytical tasks.

Core Features & Use Cases

  • Cross-Dialect Support: Provides syntax and performance tips for PostgreSQL, Snowflake, BigQuery, Redshift, and Databricks SQL.
  • Common Patterns: Includes examples for window functions, CTEs, cohort retention, funnel analysis, and deduplication.
  • Debugging Assistance: Offers guidance on handling syntax errors, column not found issues, type mismatches, and division by zero.
  • Use Case: Optimize a slow-running BigQuery query by applying partition and clustering best practices, or translate a PostgreSQL query to Snowflake syntax.

Quick Start

Use the sql-queries skill to write a BigQuery query that calculates the monthly active users for the last quarter.

Frequently Asked Questions about sql-queries

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

FAQPage Schema
How do I optimize a slow SQL query in BigQuery?

To optimize a slow SQL query in BigQuery, apply partitioning and clustering best practices to reduce data scanned, and use CTEs to improve readability and execution flow.

Can I translate a PostgreSQL query to Snowflake SQL syntax?

Yes, you can translate a PostgreSQL query to Snowflake SQL syntax by adjusting dialect-specific functions and structural patterns to match Snowflake's query engine requirements.

What is the best way to write a cohort retention SQL query?

The best way to write a cohort retention SQL query is using window functions and common table expressions to group users by acquisition date and track their subsequent activity.

Does this SQL query generator support Redshift and Databricks SQL?

Yes, this SQL query generator supports Redshift and Databricks SQL, providing correct syntax and performance optimization tips alongside PostgreSQL, Snowflake, and BigQuery dialects.

How do I debug a SQL syntax error or column not found issue?

To debug a SQL syntax error or column not found issue, validate table aliases, verify column names against the schema, and check for type mismatches or division by zero errors.

Why does my deduplication SQL query return duplicate rows?

Your deduplication SQL query might return duplicate rows if the window function partitioning logic is incomplete or the row numbering strategy fails to isolate the latest record per group.