📖 What is this tool?
SQL Query Explainer translates SQL query clauses into plain English explanations. Understand what each part of a complex query does — SELECT, FROM, JOIN types, WHERE, GROUP BY, HAVING, ORDER BY — without needing deep SQL knowledge.
💡 Example
Input
SELECT name FROM users LEFT JOIN orders ON users.id=orders.user_id WHERE active=1 GROUP BY users.id ORDER BY name DESC LIMIT 10
Output
1️⃣ SELECT — Retrieve specific columns
3️⃣ LEFT JOIN — All left rows + matched right rows
4️⃣ WHERE — Filter rows before grouping
🛠️ Common Use Cases
- Learn SQL by understanding real queries
- Debug complex queries by reading explanations
- Onboard junior developers to SQL concepts
- Document query logic in human-readable form
- Understand legacy queries in unfamiliar codebases
❓ Frequently Asked Questions
What is the difference between WHERE and HAVING? ▾
WHERE filters individual rows before grouping. HAVING filters groups after GROUP BY. You can use aggregate functions (COUNT, SUM) in HAVING but not in WHERE.
What is the difference between LEFT JOIN and INNER JOIN? ▾
INNER JOIN returns only rows with matches in both tables. LEFT JOIN returns ALL rows from the left table, with NULL for unmatched right table columns.
In what order does SQL execute clauses? ▾
SQL executes in this order: FROM → JOIN → WHERE → GROUP BY → HAVING → SELECT → ORDER BY → LIMIT. Understanding this explains why you can't use aliases in WHERE but can in ORDER BY.
🔒
Your data stays private. All processing happens entirely in your browser. Nothing is ever sent to our servers. You can use this tool offline after the page loads.