What is an SQL Query Explainer?
An SQL Query Explainer converts SQL text into plain-English descriptions of what the query does, how clauses relate, and in what logical order the database processes them. It helps you understand unfamiliar or complex SQL without running it.
Does this tool execute SQL?
No. It never connects to a database and never runs your queries. All analysis is static text parsing in your browser.
Is my SQL uploaded to a server?
No. Parsing and explanation run locally. Your SQL stays on your device.
Which SQL dialects are supported?
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), BigQuery, Snowflake, Redshift, DB2, Hive, and generic SQL via AST parsing with dialect mapping. Complex dialect-specific syntax may parse partially.
Can it explain SELECT queries?
Yes. SELECT with JOINs, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, CTEs, and window functions is the primary focus with full clause and execution-order breakdown.
Can it explain INSERT, UPDATE, and DELETE?
Yes at a basic level: target tables, SET/VALUES clauses, and WHERE filters are explained. DML explanations focus on intent and row impact, not execution plans.
Can it explain stored procedures and triggers?
Partially. Procedural blocks (PL/SQL, T-SQL batches) may parse with limited detail. A banner indicates when explanation coverage is partial.
What is logical execution order?
For SELECT queries, SQL is logically processed as WITH → FROM/JOIN → WHERE → GROUP BY → HAVING → SELECT → DISTINCT → ORDER BY → LIMIT. This differs from the order you write clauses in the query text.
Is this the same as EXPLAIN or EXPLAIN ANALYZE?
No. Database EXPLAIN shows actual execution plans and costs. This tool shows logical clause order and human-readable descriptions only — no index usage or row estimates from a live database.
Can it analyze performance?
It includes educational heuristics (SELECT *, missing WHERE on DELETE, leading wildcard LIKE) reused from the SQL Linter. These are not execution-tested performance metrics.
Does it validate table and column names?
No. Without a schema connection, the tool cannot verify that tables or columns exist. It only describes what the SQL text references.
What explanation depth levels are available?
Beginner (simple language), Intermediate (balanced default), and Technical (includes clause terminology prominently).
Can it explain multi-statement scripts?
Yes. Statements split on semicolons outside quoted strings are explained individually with a statement selector in the results panel.
What are complexity and readability scores?
Heuristic scores from 0–100 based on JOIN count, CTE count, nesting depth, line count, and style signals. They estimate learning difficulty, not runtime cost.
Can I export explanations?
Yes. Copy or download TXT, Markdown, or JSON reports from the results panel.
Can I open explained SQL in other tools?
Yes. Hand off to the SQL Validator for syntax checks, SQL Linter for quality review, or SQL Formatter to beautify output.
What is the maximum file size?
Small and medium scripts explain instantly. Inputs above ~300 KB use a Web Worker. Very large dumps may slow the browser; multi-gigabyte files are not supported in-browser.
Can I use this offline?
Yes. After the page loads, explaining works offline because processing is client-side.
Does auto-detect dialect work perfectly?
No. It is heuristic. Confirm the dialect manually when accuracy matters for dialect-specific syntax.
Can it explain CTEs and window functions?
Yes when the AST parser recognizes them. WITH clauses appear first in the execution timeline; window functions are noted in the SELECT phase.
Why use an explainer before running SQL?
Understanding intent first reduces mistakes with destructive statements, helps code review, and speeds onboarding when reading legacy or AI-generated SQL.
How is this different from the SQL Validator?
The Validator checks whether SQL parses correctly and reports syntax errors. The Explainer describes what valid (or partially valid) SQL is intended to do in plain English.
How is this different from the SQL Linter?
The Linter flags style and safety issues with scores. The Explainer teaches structure and logic. Use both for a complete pre-flight review.
Can I explain SQL while typing?
Yes. Enable auto-explain for debounced live analysis, or click Explain SQL / press Ctrl+Enter for immediate results.
What keyboard shortcut runs explain immediately?
Ctrl+Enter on Windows/Linux or Cmd+Enter on Mac.
What browsers are supported?
Modern Chromium, Firefox, Safari, and Edge with Web Worker and localStorage support.
Is this tool free?
Yes. No account, usage limit, or per-query charge.
Can students use this for learning SQL?
Yes. Beginner depth mode and execution-order steps are designed for learners reviewing JOINs, GROUP BY, and subqueries.
Does it use AI or send data to an LLM?
No. Explanations are generated deterministically from the parsed AST using local templates — no external AI API calls.
What if parsing fails?
You will see parse errors with a link to open the SQL Validator. Fix syntax first, then re-run Explain.
Can I paste AI-generated SQL here?
Yes. Explaining AI-generated SQL before execution is a common use case to verify intent and catch risky patterns.