Challenge: Get Category By Product Price
We have obtained the quantity of products in each category. Now, the company tasked us to retrieve the categories where the products cost more than a certain amount of money, so they can put a discount on them.
Swipe to start coding
Your task is to retrieve the unique category names that have products with a price
higher than 450. Use the WHERE
clause for this, where you compare 450 with the value of the price
column.
There should be only one column in the output - category.name
. You do not include the price
column in the SELECT
section; you only use it in the WHERE
section.
Brief Instructions
- Retrieve the
category.name
column from thecategory
table. - Use
DISTINCT
to get only unique values. - Join the
product
table using aJOIN
statement. - The common column for both tables is
category.id = product.category_id
. - Use a
WHERE
clause with the conditionprice > 450
.
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4Awesome!
Completion rate improved to 4
Challenge: Get Category By Product Price
We have obtained the quantity of products in each category. Now, the company tasked us to retrieve the categories where the products cost more than a certain amount of money, so they can put a discount on them.
Swipe to start coding
Your task is to retrieve the unique category names that have products with a price
higher than 450. Use the WHERE
clause for this, where you compare 450 with the value of the price
column.
There should be only one column in the output - category.name
. You do not include the price
column in the SELECT
section; you only use it in the WHERE
section.
Brief Instructions
- Retrieve the
category.name
column from thecategory
table. - Use
DISTINCT
to get only unique values. - Join the
product
table using aJOIN
statement. - The common column for both tables is
category.id = product.category_id
. - Use a
WHERE
clause with the conditionprice > 450
.
Solution
Thanks for your feedback!
single
Awesome!
Completion rate improved to 4
Challenge: Get Category By Product Price
Swipe to show menu
We have obtained the quantity of products in each category. Now, the company tasked us to retrieve the categories where the products cost more than a certain amount of money, so they can put a discount on them.
Swipe to start coding
Your task is to retrieve the unique category names that have products with a price
higher than 450. Use the WHERE
clause for this, where you compare 450 with the value of the price
column.
There should be only one column in the output - category.name
. You do not include the price
column in the SELECT
section; you only use it in the WHERE
section.
Brief Instructions
- Retrieve the
category.name
column from thecategory
table. - Use
DISTINCT
to get only unique values. - Join the
product
table using aJOIN
statement. - The common column for both tables is
category.id = product.category_id
. - Use a
WHERE
clause with the conditionprice > 450
.
Solution
Thanks for your feedback!