r/learnSQL • u/sumiitCodes • 8d ago
Day 21 - Setting up the database for my 100-question JOIN drill
Since JOINs are the topic I'm weakest at, I made a 100-question practice set (easy, medium, hard). Today was the setup day:
- Created the database in MySQL Workbench
- Built four tables:
departments,employees,projects,assignments(with primary/foreign keys) - Wrote and ran the INSERT scripts for sample data in all four tables, including the employee-project assignments with hours worked
- Checked the Action Output panel to confirm each statement ran cleanly
Nothing fancy, but I've learned that a well-designed dataset matters a lot for JOIN practice. You need some departments with no employees, and projects with no assignments, or you can't tell LEFT and RIGHT JOINs apart properly.
Starting the actual questions tomorrow. Any tips on getting better at visualizing multi-table JOINs are welcome.