Plain-English explanation of what the SQL does. Offline.
/explain-sql <sql>
## Overview `/explain-sql` produces a prose summary of what the supplied SQL does, written for humans rather than planners. It works by running the script through the embedded parser and the docs-backed explanation module, so the output is generated offline without a model call and without a control-plane round-trip. ## Behavior - Produces one paragraph per top-level statement, in original order. - Describes the logical intent (what the script reads, writes, and filters) rather than the physical plan. For physical plans, run `EXPLAIN` against the engine instead. - Works for DML, DDL, maintenance commands, and pipeline declarations. - Useful for code review, onboarding, and generating commit-message prose for a pipeline change.
/explain-sql WITH t AS (SELECT * FROM silver.orders WHERE total > 100) MERGE INTO gold.orders USING t ON gold.orders.id = t.id WHEN MATCHED THEN UPDATE SET total = t.total
/explain-sql OPTIMIZE sales.orders ZORDER BY (customer_id)
/explain-sql DELETE FROM audit.events WHERE ts < NOW() - INTERVAL 30 DAY