Prism

Prism

see the shape of any SQL query

Prism

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.

Editor

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.

Views

FlowThe 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.
JoinsEach 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.
LogicWHERE, HAVING and ON as boolean trees so AND/OR precedence is visible; CASE expressions as tables; window functions explained with a frame picture.
StepsThe query in execution order (FROM → JOIN → WHERE → GROUP BY → HAVING → window → SELECT → ORDER BY → LIMIT), narrated. Step through with the buttons or N/P.
ColumnsOutput columns with inferred types and full lineage back through every CTE to the physical columns.
LintFindings with one-click fixes where a rewrite is safe (OR chains → IN, comma joins → JOIN ON, lift subqueries into CTEs).
OutlineThe clause tree; click anything to jump to it.

Transform

Format (comment-preserving), compact, keyword case, lift every derived table into a named CTE, convert comma joins. Every transform can be undone.

Keys

Ctrl+/ or ?this help
Ctrl+Shift+Fformat (works while typing)
Ctrl+S / Ctrl+Osave / open a session (.json) — Open also accepts a .sql file
1 … 7switch view
N / Pnext / previous step
Ffit the flow diagram
Ttheme
Escclose 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.