Course Content
Intermediate SQL
Intermediate SQL
Get Minimum Price By Category
The company needs to find the minimum price of a product from each category in order to organize a marketing campaign. They have assigned you this task!
Just a reminder, we are working with two tables:
product
:
category
:
Now let's get back to the task!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!
Everything was clear?
Get Minimum Price By Category
The company needs to find the minimum price of a product from each category in order to organize a marketing campaign. They have assigned you this task!
Just a reminder, we are working with two tables:
product
:
category
:
Now let's get back to the task!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!
Everything was clear?
Get Minimum Price By Category
The company needs to find the minimum price of a product from each category in order to organize a marketing campaign. They have assigned you this task!
Just a reminder, we are working with two tables:
product
:
category
:
Now let's get back to the task!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!
Everything was clear?
The company needs to find the minimum price of a product from each category in order to organize a marketing campaign. They have assigned you this task!
Just a reminder, we are working with two tables:
product
:
category
:
Now let's get back to the task!
Task
Your task is to obtain the minimum price for each product category. However, to provide customers with options, you need to retrieve only those categories where there are more than 5 different products. You'll need to join two tables, aggregate the data, and use the HAVING
clause.
At the end, sort the result by the category_name
in the ascending order.
Note
Pay attention that in the response, you should have 2 columns:
category_name
andmin_price
. So don't forget to set aliases for these columns!