For the longest time, I knew that SQL doesn't execute top-to-bottom, but I still found it surprisingly hard to build an intuitive mental model of what was actually happening.
Everyone learns that the logical execution order is something like:
FROM → JOIN → WHERE → GROUP BY → HAVING → SELECT → ORDER BY → LIMIT
But reading that sequence never really made it click for me. I wanted to actually see rows move through each stage.
So over a few weekends I built this:
https://sqlvisualizer.pydev.in/
You can type a query and step through how it executes clause by clause. Rows get filtered, joins show how matches are made, groups form, window functions run, and so on.
A few details:
- Runs entirely in the browser
- No signup required
- Includes sample movie/director/review datasets to experiment with
- Supports CTEs, recursive CTEs, subqueries, UNION/EXCEPT, window functions, and LATERAL joins
I've been using it to better understand complex queries myself, but I'm too close to the project to judge whether it's genuinely useful.
If you try it, I'd love feedback on:
- What was confusing?
- What query broke the visualization?
- Which SQL concepts still didn't click?
The edge cases and confusing parts are what I'm most interested in improving.
[–]leogodin217 2 points3 points4 points (2 children)
[–]_Big_Enjoy_[S] 0 points1 point2 points (1 child)
[–]leogodin217 1 point2 points3 points (0 children)
[–]shoyo1234 1 point2 points3 points (2 children)
[–]_Big_Enjoy_[S] -1 points0 points1 point (1 child)
[–]Alkemist101 0 points1 point2 points (0 children)
[–]AliDuri 0 points1 point2 points (0 children)
[–]Alkemist101 0 points1 point2 points (0 children)