From the course: SQL: Data Reporting and Analysis

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Challenge: Query a table

Challenge: Query a table - SQL Tutorial

From the course: SQL: Data Reporting and Analysis

Challenge: Query a table

(upbeat music) - As you already know, the Sakila Demo Database is for a movie rental store. That's an old-fashioned shop that you go into and you hire a DVD from. For our first challenge, I want you to imagine you work at such a store and a customer has asked for your advice to find a film that's either rated, PG parental guidance, or G, generally suitable for all. The only description they give is that they are looking for a drama. And for this challenge, I want you to confine your search to the film table. Next, I'm going to give you the same challenge in more query-like terms. If you like, you can pause the video now and try to build the query, or you can wait for a few more clues. So in other words, to help your customer, I want you to return all the records from the film table where the rating is either G or PG and the description field contains the word drama. There's more than one correct solution here. And…

Contents