From the course: SQL: Data Reporting and Analysis
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Challenge: Join tables - SQL Tutorial
From the course: SQL: Data Reporting and Analysis
Challenge: Join tables
(upbeat music) - [Instructor] Conceptually, this challenge is very simple. You want to return all data from the film, film_category, and category tables, filtering for comedies. Last time we filtered for a film type in a challenge, we used the like keyword and the description field from the film table to filter for drama types. But that was a bit of a hack, really. The category table is what stores actual film type. You can see we have action, animation, and then number five there is comedy, and this is what we're going to filter on. So this challenge is all about joining tables together in order to perform a proper filter. In query terms, we want to return all records from the film, film_category and category tables, filtering on category.name = "comedy". You should be able to complete this in five minutes.
Contents
-
-
-
-
-
-
(Locked)
Make your queries faster1m 47s
-
(Locked)
Understand SQL indexes and keys7m 16s
-
(Locked)
EDIT: Visualize your database7m 58s
-
(Locked)
Merge data across tables with JOIN5m 2s
-
(Locked)
Understand SQL JOINS4m 16s
-
(Locked)
Combine rows with SQL UNION4m 49s
-
(Locked)
Merge data across tables with IN2m 11s
-
(Locked)
Select from a selection with subqueries2m 56s
-
(Locked)
Challenge: Join tables1m 4s
-
(Locked)
Solution: Join tables4m 37s
-
(Locked)
-
-