Select Page

Step 1. Place your order

Fill in the order form and provide all details of your assignment.

Step 2. Make Payment

Choose the payment system that suits you most.

Step 3. Receive your paper

Once your paper is ready, we will email it to you.

Write the sql statement used to answer the previous question that also displays all columns.

by | Oct 16, 2022 | Computer science

 

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

For This or a Similar Paper Click To Order Now

CIST1200 – Lab 2
Using the Northwind Database write the SQL for all of these and execute them. Do NOT
use the MS Access Query By Example (QBE) feature. Actually write the SQL.
1. Enter the SQL statement for that meets the following specifications:
a. Create a query from the Products Table of the products that are supplied by the
suppliers with SupplierID of 2 or 3.
b. Order the result by ProductID.
c. Include only the following columns:
[ProductID], [ProductName], [SupplierID], [CategoryID], [UnitPrice]
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
2. Using the Suppliers table, what country is Supplier ID 2 located in? _____________
3. Write the SQL statement used to answer the previous question:
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
4. How many Orders meet the following requirements? __________
a. EmployeeID = 4
b. And ShipCountry =‘Germany’
5. Write the SQL statement used to answer the previous question that also displays all
columns.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
6. Write the SQL statement using the Product table that will:
a. List all beverages (CategoryID=1)
b. That have a unit price greater than 20.
c. Include only the following columns.
[ProductID], [ProductName], [SupplierID], [CategoryID], [UnitPrice]
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
7. Write the query using the Customer Table that will:
a. List the Customers whose CompanyName begins with the letter ‘T’
b. And live in the USA.
c. Include only the following columns:
[CustomerID], [CompanyName], [City], [Country]
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
8. How many Customers are from Mexico? ______________
9. Write the SQL statement used to answer the previous question.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
10. What is the product name of the product with the highest UnitPrice? ______________
11. What is the price of the product found in the previous question? ______________
12. Write the SQL statement used to answer the previous two questions.
(HINT: Use a subquery to find the highest price.)
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
13. What is the product name of the product with the lowest UnitPrice? _____________
14. What is the price of the product found in the previous question? ____________
15. Write the SQL statement used to answer the previous two questions.
(HINT: Use a subquery to find the lowest price.)
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
16. Using the Products table, what is the total value of all items carried in inventory?
(Note: The total value uses both the number of items in stock and the unit price.)
_________
17. Write the SQL statement used to answer the previous question.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
18. Using the ‘COUNT’ function with the Group By clause, what is the query that will
display a count of the customers in each country?
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
19. Using the ‘SUM’ function with the Group By clause, what is the query that will display
a total quantity ordered from each supplier?
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
20. What is the query that meets the following specifications?
a. ‘JOIN’s the Product and Category tables
b. Displays from the Product Table: ProductID, ProductName, CategoryID
c. Displays from the Category Table: CategoryName
d. Only include rows that are for Dairy Products or Beverages.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

 

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

For This or a Similar Paper Click To Order Now

Treat Yourself to Much Needed Assistance