sql-queries

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

2|1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/GACLove/feishu-aily-skills --skill sql-queries-gaclove
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-queries
Source: https://github.com/GACLove/feishu-aily-skills/tree/main/skills/sql-queries
Command: npx skills add https://github.com/GACLove/feishu-aily-skills --skill sql-queries-gaclove

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Professionals often struggle to write SQL that works across different data‑warehouse dialects while remaining performant and readable. This Skill eliminates dialect‑specific guesswork and reduces costly query errors.

Core Features & Use Cases

  • Dialect Reference: Detailed syntax, functions, and performance tips for PostgreSQL, Snowflake, BigQuery, Redshift, and Databricks.
  • Pattern Library: Ready‑to‑use templates for window functions, CTEs, cohort analysis, and funnel calculations.
  • Use Case: Quickly generate a cross‑dialect query to analyze monthly revenue trends without rewriting the logic for each platform.

Quick Start

Ask the sql-queries skill to create a PostgreSQL query that lists the top 10 customers by revenue for the previous month.

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 warehouses?

To write cross-dialect SQL queries, you need dialect-specific syntax references for platforms like PostgreSQL, Snowflake, BigQuery, Redshift, and Databricks to ensure correct functions and performance optimizations are applied.

What's the best way to optimize BigQuery SQL for performance?

Optimizing BigQuery SQL performance requires applying dialect-specific best practices and using ready-to-use templates for window functions and CTEs to ensure readable, efficient query execution.

Can I use the same SQL query logic for PostgreSQL and Snowflake?

You cannot always use identical SQL logic for PostgreSQL and Snowflake because dialect-specific syntax and functions differ, requiring adjustments to maintain performance and correctness across data warehouses.

How do I generate a cohort analysis SQL query without starting from scratch?

You can generate a cohort analysis SQL query by using pattern library templates that provide ready-to-use structures for cohort analysis, funnel calculations, and window functions to accelerate reporting tasks.

Why does my data warehouse SQL query fail when migrating from Redshift to Databricks?

Your SQL query fails migrating from Redshift to Databricks due to differing dialect-specific syntax and functions, requiring cross-dialect reference knowledge to rewrite logic correctly for the new platform.