SQL concepts

Interactive SQL Visualizer

From SELECT and JOINs to subqueries, views, indexes, and stored procedures — every concept runs live in your browser.

Build SELECT / JOIN / GROUP BY visually and watch two tables become a result.

Basics
Joins
Aggregation
users4 rows
id🔑namecity
1AshaPune
2RaviMumbai
3NehaPune
4KiranDelhi
orders5 rows
iduser_id🔑amountstatus
10111200paid
1021800paid
10321500pending
1043500paid
1055999paid

rows that match on the 🔑 key share a colour no partner — becomes NULL or is dropped, depending on the join

The query
SELECT *
FROM users
INNER JOIN orders ON users.id = orders.user_id;

INNER JOIN

Only rows that match on both sides.

How it runs — clause by clause

FROM users
4rows
INNER JOIN orders
4rows
Result4 rows
users.idusers.nameusers.cityorders.idorders.user_idorders.amountorders.status
1AshaPune10111200paid
1AshaPune1021800paid
2RaviMumbai10321500pending
3NehaPune1043500paid

INNER JOIN keeps only rows that match on both sides (users.id = orders.user_id). Kiran (no orders) and order #105 (no user) both disappear — only real pairs remain.

Build & customize the queryclick clauses to change the query above

SELECT — columns

FROM + JOIN

ON=

WHERE — filter rows

No filter — all rows pass.

GROUP BY · aggregate · ORDER BY

GROUP BY
Aggregate
ORDER BYLIMIT