From the course: SQL for Testers
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Solution: Database tests - SQL Tutorial
From the course: SQL for Testers
Solution: Database tests
- [Instructor] The first challenge I gave you in the last video was to create a schema for these tables. So hopefully you were able to create something that looks kind of like this. Probably the most interesting thing to note about this schema is that this enrollments table is connected to all the other tables. So you'll probably need to do a bunch of joins when we want to get data from multiple tables. None of these tables, the roles users and classes tables are connected to each other. They're only connected through the enrollments table. For the next challenge, I asked you to find the name of the students enrolled in the math class. So let's try to break this down. So first of all, we know that we need to get the student names and we're going to get those from the users table. So users dot first name. From users. And now we need to get this for students that are enrolled in the math class, so we'll have to join with the enrollments table. So let's do a join with enrollments and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.