sql-generation

Generates SQL syntax for Databricks, Fabric Synapse, and KQL Eventhouse platforms.

4|1|Updated May 22, 2026
One-click install
npx skills add https://github.com/ThomazRossito/ai-data-agents --skill sql-generation-thomazrossito
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sql-generation
Source: https://github.com/ThomazRossito/ai-data-agents/tree/main/plugins/ai-data-agents/skills/sql-generation
Command: npx skills add https://github.com/ThomazRossito/ai-data-agents --skill sql-generation-thomazrossito

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing correct SQL across Databricks Unity Catalog, Microsoft Fabric Synapse, and Fabric Eventhouse requires knowing each platform's dialect, and using deprecated patterns like PARTITIONED BY with ZORDER BY leads to suboptimal Delta tables. ## Core Features & Use Cases - Databricks Delta DDL: Create managed Delta tables on Unity Catalog using Liquid Clustering with CLUSTER BY, plus OPTIMIZE and VACUUM maintenance commands. - Fabric Synapse T-SQL: Query patterns for Fabric Data Warehouse including TOP N, DATEADD, and aggregation joins. - KQL for Eventhouse: Real-time analytics queries with time-based filtering and binning for Fabric RTI. - T-SQL to Spark SQL Conversion: A mapping table for translating functions like GETDATE, ISNULL, and STRING_AGG between dialects. - Use Case: When asked to create a new sales table in Databricks, generate a CREATE TABLE statement using CLUSTER BY on date and category columns instead of legacy partitioning. ## Quick Start Generate a Databricks Delta table DDL with Liquid Clustering for my sales data using the sql-generation skill.

Frequently Asked Questions about sql-generation

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

FAQPage Schema
How do I create a Delta table with Liquid Clustering in Databricks?▼

Use CREATE TABLE with USING DELTA and CLUSTER BY (columns) instead of PARTITIONED BY. Liquid Clustering replaces static partitioning and ZORDER BY, offering better read performance without defining fixed partitions.

How to convert T-SQL functions to Spark SQL?▼

Map TOP N to LIMIT N, GETDATE() to CURRENT_TIMESTAMP(), ISNULL to COALESCE, and DATEADD to DATE_SUB or ADD_MONTHS. Window functions like ROW_NUMBER() OVER work identically in both dialects.

Should I use PARTITIONED BY or CLUSTER BY for new Delta tables?▼

Use CLUSTER BY (Liquid Clustering) for new managed Delta tables on Unity Catalog. PARTITIONED BY with ZORDER BY are legacy patterns; CLUSTER BY manages file layout automatically and eliminates static partition maintenance.

How do I write KQL queries for Fabric Eventhouse?▼

Use the pipe-based KQL syntax: filter with where ingestion_time() > ago(1h), aggregate with summarize count() and avg() by bin(Timestamp, 1m), and sort with order by. This targets real-time analytics in Fabric RTI.

How do I add Liquid Clustering to an existing Delta table?▼

Run ALTER TABLE catalog.schema.table CLUSTER BY (columns) to migrate a legacy partitioned table, then execute OPTIMIZE to reorganize existing files according to the new clustering keys.