What problem does it solve? Data engineers often inherit or write SQL queries they only partially understand, and generic explanations don't build lasting knowledge. This Skill turns any pasted query into a structured learning artifact that teaches how the database actually executes it, names the reusable patterns inside it, and flags silent bugs. ## Core Features & Use Cases - Four-layer explanation: Produces a TL;DR, logical execution order, line-by-line walkthrough, and a patterns & techniques section that names transferable concepts like gaps-and-islands, anti-joins, and latest-row-per-group. - Row trace, performance notes, and pitfalls: Invents representative sample rows to trace through each execution stage, calls out engine-specific performance concerns, and surfaces silent bugs such as NULL handling in NOT IN or fan-out joins masked by DISTINCT. - Dialect awareness: Defaults to Snowflake semantics but detects Oracle and Databricks syntax, with inline notes on cross-dialect differences like QUALIFY, LISTAGG, and FLATTEN. - Use Case: You paste a 200-line query with nested CTEs from a colleague and ask what it does. The Skill explains each CTE, identifies it as a gaps-and-islands pattern, traces sample rows, warns about a NULL-handling pitfall, and saves the tagged explanation to your local catalog directory for future grep-based reference. ## Quick Start Paste a SQL query and ask the assistant to explain what it does and walk through how it works.