Skip to content
BEAD

SQL Query Highlighter

Color-coded SQL with a clause-by-clause breakdown — SELECT, FROM, JOIN, WHERE, GROUP BY explained.

Highlighted
SELECT u.id, u.email, COUNT(o.id) AS order_count
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at > '2024-01-01'
  AND u.status = 'active'
GROUP BY u.id, u.email
HAVING COUNT(o.id) > 3
ORDER BY order_count DESC
LIMIT 50;
Clause breakdown
SELECTColumns and expressions to return.
u.id, u.email, COUNT(o.id) AS order_count
FROMThe source table(s).
users u
LEFT JOINAll left-side rows; right-side filled with NULL when no match.
orders o ON o.user_id = u.id
WHEREFilters rows before grouping.
u.created_at > '2024-01-01'
  AND u.status = 'active'
GROUP BYCollapses rows into groups for aggregate functions.
u.id, u.email
HAVINGFilters groups produced by GROUP BY.
COUNT(o.id) > 3
ORDER BYSorts the final result.
order_count DESC
LIMITCaps the number of rows returned.
50

What it does

A non-AI “explainer” — it tokenizes the query, colors the major clauses (SELECT, FROM, JOIN, WHERE, GROUP BY, ORDER BY, HAVING, LIMIT), and lists each clause's body underneath in plain English.

What it does not do

It does not run the query, generate an execution plan, or read your schema. For real EXPLAIN output, run it against your database.

You might also like