motherduck-duckdb-sql
DuckDB SQL Reference for MotherDuck
Use this skill when you need exact DuckDB syntax, function behavior, or a quick sanity check that a statement will actually work on MotherDuck.
Source Of Truth
- Prefer current DuckDB SQL docs for language features and function semantics.
- Use current MotherDuck SQL docs for MotherDuck-only commands such as shares, secrets, snapshots, and Dive operations.
- Check MotherDuck version-lifecycle docs for newly released DuckDB features before promising they are available in MotherDuck.
- Treat upstream DuckDB 1.5.x docs as ahead of MotherDuck unless the current MotherDuck lifecycle docs confirm the same DuckDB version and feature surface.
- Distinguish upstream DuckDB current-version docs from MotherDuck-supported DuckDB versions; MotherDuck can lag upstream current for client compatibility and SQL feature support.
- If the connection path matters, verify behavior against the current Postgres-endpoint docs before promising server-mode support.
Default Posture
- Write DuckDB SQL, not PostgreSQL SQL, even when the client connects through the Postgres endpoint.
- Use fully qualified
"database"."schema"."table"names once more than one database or share is in scope. - Prefer DuckDB-native constructs when they simplify the query:
GROUP BY ALL,QUALIFY,UNION BY NAME,arg_max,EXCLUDE, andREPLACE. - When porting SQL from another engine, translate functions, date arithmetic, identifier quoting, and type casts explicitly instead of assuming compatibility.
More from motherduckdb/agent-skills
motherduck-security-governance
Explain MotherDuck security, governance, and access-control patterns. Use when a security_compliance_owner, technical_owner, or application_builder is asking about residency, access boundaries, service accounts, isolation, sharing, or governance posture.
56motherduck-build-cfa-app
Design a MotherDuck-backed customer-facing analytics app. Use when building embedded or product analytics for external users and the decision depends on per-customer isolation, backend routing, service-account boundaries, read scaling, or Hypertenancy-style patterns.
54motherduck-build-data-pipeline
Design an end-to-end MotherDuck pipeline. Use when choosing raw, staging, and analytics boundaries, bulk ingestion paths, transformation sequencing, publication targets, or whether DuckLake is actually required.
54motherduck-ducklake
Decide when DuckLake is the right MotherDuck storage pattern. Use when evaluating fully managed DuckLake, BYOB, own-compute DuckLake access, data inlining, object-storage layout, or file-aware maintenance instead of native MotherDuck storage.
54motherduck-create-dive
Create, edit, manage, share, or embed MotherDuck Dives. Use when the work involves Dive authoring, live React + SQL components, MCP get_dive_guide, useSQLQuery, local preview, version history, Dives-as-code, required resources, team sharing, or embedded Dive sessions.
54motherduck-build-dashboard
Build a live MotherDuck dashboard as a Dive. Use when composing one shareable KPI, trend, and breakdown story over existing MotherDuck data, especially when the result should stay a saved workspace artifact rather than a full application.
54