From the course: Database Foundations: Intro to Databases
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Solution: Write a SQL SELECT query
From the course: Database Foundations: Intro to Databases
Solution: Write a SQL SELECT query
(bouncy upbeat music) - [Instructor] In this code challenge, we were asked to find some chicken-based recipes that we can prepare quickly from a table of recipes we've got stored. And I'm just going to run the SELECT statement just so we can see the data that we have to work with. So we have a total of 25 different recipes here. I've got spaghetti carbonara, chicken tikka masala. If I scroll over here to the right, I've got a column for the primary ingredient. So this is an identification number for the ingredient, as well as the prep time and the date that this recipe was added into our table. So that is the recipes table. We can also take a look at the ingredients table by changing the SELECT statement to SELECT * FROM Cooking.Ingredients. And here we can see the ID numbers for each of our ingredients, as well as the name. So here is the one that we're interested for this challenge, chicken, which is ingredient ID number two. All right, with all of that in mind, we can get started…
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.
Contents
-
-
-
-
-
-
-
-
(Locked)
Querying data2m 45s
-
(Locked)
Return data with SELECT and FROM6m 36s
-
(Locked)
Filter rows with WHERE4m 4s
-
(Locked)
Sort values with ORDER BY2m 43s
-
(Locked)
Combine data with JOIN4m 46s
-
(Locked)
Limiting the number of rows returned3m 35s
-
(Locked)
Solution: Write a SQL SELECT query6m 1s
-
(Locked)
-
-