Paste any SQL — one statement or a whole script, any major dialect — and Prism parses it in the browser and shows its shape from seven angles. Nothing leaves the page.
Every table, CTE and alias gets its own colour, and every column lights up in the colour of the table it belongs to. Put the cursor on (or hover) any name to see what it is and highlight every other place it is used; the strip below the editor shows where you are (query › CTE › clause). Red wavy underlines are syntax Prism could not read — everything around them still works.
| Flow | The dataflow: tables feed CTEs and subqueries feed the result. Click a node to focus it and jump to its SQL; drag to pan, wheel or pinch to zoom. |
| Joins | Each table in a block with how it is joined and, most importantly, whether the join can multiply rows (fan-out) — the grain of the result is tracked step by step. |
| Logic | WHERE, HAVING and ON as boolean trees so AND/OR precedence is visible; CASE expressions as tables; window functions explained with a frame picture. |
| Steps | The query in execution order (FROM → JOIN → WHERE → GROUP BY → HAVING → window → SELECT → ORDER BY → LIMIT), narrated. Step through with the buttons or N/P. |
| Columns | Output columns with inferred types and full lineage back through every CTE to the physical columns. |
| Lint | Findings with one-click fixes where a rewrite is safe (OR chains → IN, comma joins → JOIN ON, lift subqueries into CTEs). |
| Outline | The clause tree; click anything to jump to it. |
Format (comment-preserving), compact, keyword case, lift every derived table into a named CTE, convert comma joins. Every transform can be undone.
| Ctrl+/ or ? | this help |
| Ctrl+Shift+F | format (works while typing) |
| Ctrl+S / Ctrl+O | save / open a session (.json) — Open also accepts a .sql file |
| 1 … 7 | switch view |
| N / P | next / previous step |
| F | fit the flow diagram |
| T | theme |
| Esc | close panels, clear focus |
Single-letter keys are ignored while you type. Save downloads a file when Prism is opened directly from disk (the artifact viewer blocks downloads). Type and key inference are heuristics from names — a column called id is assumed unique — so treat fan-out warnings as questions, not verdicts.