sql-generation

Generate BigQuery SQL statements adhering to BTDP standards.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/smorand/claude-config --skill sql-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-generation
Source: https://github.com/smorand/claude-config/tree/main/skills/sql-generation
Command: npx skills add https://github.com/smorand/claude-config --skill sql-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides structured, standards-based SQL guidance for BigQuery, including scenario selection, discovery workflows, and optimization practices.

Core Features & Use Cases

  • Mandatory coding rules: Uppercase keywords, explicit joins, no SELECT *.
  • Scenario-guided guidance: Ad-hoc analysis, materialized views, and data preparation patterns.
  • RAG & SDDS discovery: Guidance for discovering tables, schemas, and data sources.
  • Time-based patterns: Dynamic date usage and rolling windows.

Quick Start

Start with SKILL.md to choose a scenario, then reference the time-based patterns for a dynamic query.

Frequently Asked Questions about sql-generation

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

FAQPage Schema
How do I generate production-ready BigQuery SQL that follows BTDP standards?

This Skill generates BigQuery SQL statements adhering to BTDP standards, enforcing uppercase keywords, explicit JOINs, no SELECT *, and dynamic date handling. It guides you through scenario selection—ad-hoc analysis, materialized views, or data preparation—then applies optimization via CTEs and discovery workflows to produce standards-compliant queries.

What are the mandatory coding rules for BigQuery SQL in BTDP environments?

BTDP BigQuery SQL requires uppercase keywords, explicit JOIN syntax, no SELECT *, and dynamic date patterns for rolling windows. This Skill enforces these rules across all query types, ensuring consistency and maintainability in production workloads.

How do I use CTEs and discovery workflows to optimize BigQuery queries?

CTEs structure complex queries into readable, reusable blocks; discovery workflows help identify tables and schemas before writing. This Skill combines both techniques to optimize query performance and clarity, particularly for MERGE-based data preparation and materialized-view scenarios.

Can I use this for ad-hoc analysis, data preparation, and materialized views?

Yes. This Skill covers all three: ad-hoc analysis with dynamic queries, MERGE-based data preparation with staged transformations, and materialized-view workloads. Each scenario includes specific patterns and coding rules tailored to BTDP BigQuery environments.

What's the difference between using SELECT * versus explicit column selection in BigQuery?

Explicit column selection improves performance, readability, and maintainability by avoiding unexpected schema changes and reducing data transfer. This Skill enforces explicit selection as a mandatory rule, replacing SELECT * across all query patterns.

How do I handle dynamic dates and rolling windows in BigQuery queries?

Dynamic date handling uses parameterized date expressions rather than hardcoded values, enabling rolling windows and time-based aggregations. This Skill provides time-based patterns and implementation guidance for common scenarios like daily, weekly, and monthly rollups.