What problem does it solve?
It helps you execute correct, production-ready analytical SQL against MotherDuck by turning ambiguous, PostgreSQL-shaped queries into DuckDB-native queries with predictable results and safer execution semantics.
Core Features & Use Cases
- DuckDB SQL-first guidance: Produces DuckDB-native query patterns (CTEs, window functions with QUALIFY, GROUP BY ALL) instead of PostgreSQL-style SQL.
- Correctness and performance guardrails: Encourages fully qualified table names, explicit result grain, early filtering/aggregation, and plan/shape checks to avoid inefficient rescans and unintended sorts.
- Safe operations posture: Treats DDL/DML and lifecycle/recovery commands as writes and clarifies when MCP write-capable operations should be used only with explicit user confirmation.
Quick Start
Use motherduck-query to generate a DuckDB SQL query that returns the top 20 customers by total completed order amount for a specified date range using fully qualified table names.