Course Content
Intermediate SQL
2. Nested Subqueries
4. Left, Right, and Inner Joins
Intermediate SQL
Challenge
Task
- You need to get the names (
name
column from theproduct
table) and price (price
column from theprice
table); - Join these tables using the
INNER JOIN
byproduct_id
column; - The price must be the following values:
(10, 4, 2)
. For it use theIN
keyword; - Take the first 5 records.
Here's a short example of the product
table:
name | product_id |
Twinings Earl Grey tea | 1 |
Rice | 3 |
Chicken meat | 4 |
... | ... |
Nescafe Gold | 14 |
Here's a short example of the price
table:
product_id | price |
1 | 10 |
2 | 8 |
... | ... |
14 | 15 |
Everything was clear?
Section 4. Chapter 2