Course Content
Intermediate SQL
Intermediate SQL
Get Product Amount By Category
Great job!
Now the company has a new task for us.
A new supplier contacted us and said that they can supply goods from the categories Meat
or Grains
cheaply. We need to find out which products in these categories have less than 100 units left in stock.
Just a reminder, we are working with two tables:
product
:
category
:
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!
Everything was clear?
Get Product Amount By Category
Great job!
Now the company has a new task for us.
A new supplier contacted us and said that they can supply goods from the categories Meat
or Grains
cheaply. We need to find out which products in these categories have less than 100 units left in stock.
Just a reminder, we are working with two tables:
product
:
category
:
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!
Everything was clear?
Get Product Amount By Category
Great job!
Now the company has a new task for us.
A new supplier contacted us and said that they can supply goods from the categories Meat
or Grains
cheaply. We need to find out which products in these categories have less than 100 units left in stock.
Just a reminder, we are working with two tables:
product
:
category
:
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!
Everything was clear?
Great job!
Now the company has a new task for us.
A new supplier contacted us and said that they can supply goods from the categories Meat
or Grains
cheaply. We need to find out which products in these categories have less than 100 units left in stock.
Just a reminder, we are working with two tables:
product
:
category
:
Task
Your task is to retrieve the product names and their quantities
in stock. To do this, you'll need to join two tables. The category of these products should be Meat
or Grains
. Keep in mind that you'll need to use the OR
operator for this. Also, the quantity of the product should be less than 100. To do this, you'll need to use the AND
operator.
Also, you need to sort the result by the name
column using the ORDER BY
clause.
Note
Keep in mind that you should wrap the string with the
OR
operation in parentheses and then use theAND
operator. Here, the standard order of operations from discrete mathematics applies.
As a result, you should have 2 columns: product_name
and amount
, so don't forget to set appropriate aliases!