Translate SQL queries into plain English descriptions

Explain a SQL query in logical processing order from rows to final result.

freeworks offlinenothing uploaded
ToolSQL Explainer
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The query is summarized through FROM and joins, WHERE, grouping, HAVING, projection, DISTINCT, ordering, and LIMIT. The explanation describes semantics without executing the statement or reading data.

  • Logical order explains alias and aggregate behavior.
  • Written SELECT order differs from processing order.

Worked example

Explain SELECT with JOIN
Get a plain English explanation of a SELECT query with JOIN and WHERE
Input
											SELECT u.name, COUNT(o.id) as order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.active = true GROUP BY u.name HAVING COUNT(o.id) > 5 ORDER BY order_count DESC LIMIT 10
										
Output
												This query retrieves data:
- Selects 2 column(s): u.name, COUNT(o.id) as order_count
- From the "users" table
- LEFT JOINs with "orders"
- Filters rows where: u.active = true
- Groups results by: u.name
- Filters groups where: COUNT(o.id) > 5
- Orders results by: order_count DESC
- Limits to 10 row(s)
											

When to use this

Query teaching, code reviews, and support investigations explain SQL results.

Edge cases

  • WHERE runs before grouping and cannot use aggregate aliases.
  • HAVING filters groups after aggregation.
  • LIMIT applies after ordering in the result pipeline.

References