What problem does it solve? Writing correct, performant SQL against MotherDuck requires DuckDB-specific syntax and patterns that differ from PostgreSQL, and mistakes like unqualified table names or misused window functions lead to wrong results or slow queries. This Skill guides the AI to write idiomatic DuckDB SQL with proper grain, filtering, and aggregation discipline. ## Core Features & Use Cases - DuckDB-Native Query Patterns: Enforces CTEs, GROUP BY ALL, QUALIFY, arg_max, FILTER, PIVOT/UNPIVOT, and fully qualified database.schema.table names. - Performance Optimization: Covers filter-early/aggregate-early strategy, EXPLAIN plan review, predicate pushdown, and pre-aggregated serving tables for repeated reads. - Safe Write Handling: Treats DDL, DML, ATTACH, and SHUTDOWN lifecycle commands as writes requiring explicit user confirmation via MCP query_rw. - Use Case: Ask for the top 5 products per category by revenue, and receive a QUALIFY-based window function query against your fully qualified MotherDuck tables, ready to run. ## Quick Start Ask the AI to write a DuckDB query that computes monthly revenue per region from your MotherDuck analytics database using fully qualified table names.