Unit 01 · Practice

Practice

Each question shows you one or two tables from Northwind, along with the query that produced each one. Read the tables, find the answer, and type it in.

Every answer is either a number or a name. Type just that, with no other words. For example, type 3 and not 3 records.

The Tables panel on the right of your screen lists every table in Northwind and the columns in it. If you don't see it, your screen is too narrow to fit it. Click the blue Tables button in the bottom right corner and it slides in. In the panel, PK marks a primary key and FK marks a foreign key.

1

Count the records in the Shippers table. How many are there?

SELECT * FROM Shippers;
2

How many columns does the Categories table have?

SELECT * FROM Categories;
3

Find the product named Tofu in the Products table. What is its price?

SELECT * FROM Products;
4

Which column is the primary key of the Products table?

SELECT * FROM Products;

Find Products in the Tables panel. The primary key is the column marked PK.

5

CategoryID in the Products table is a foreign key. Which table does it point to?

SELECT * FROM Products;

Look through the Tables panel for the table where CategoryID is the primary key.

6

Find order 10250 in the Orders table. What is the name of the customer who placed it?

SELECT * FROM Orders;
SELECT * FROM Customers;

Read the CustomerID on order 10250. Then find the record with that CustomerID in the Customers table.

7

Find the product named Ikura in the Products table. What is the name of the category it's in?

SELECT * FROM Products;
SELECT * FROM Categories;

Read the CategoryID on Ikura. Then find the record with that CategoryID in the Categories table.

8

Northwind gets several products from the supplier Pavlova, Ltd. Name one of them.

SELECT * FROM Suppliers;
SELECT * FROM Products;

This one goes the other direction. Read the SupplierID of Pavlova, Ltd. in the Suppliers table. Then look down the SupplierID column of Products until you find a product with that number.

9

Speedy Express is the shipper on 54 of Northwind's orders. The company gets bought out, and its name changes to Rapid Freight. How many records in the database have to change?

SELECT * FROM Shippers;
SELECT * FROM Orders;
10

Order 10248 has a 5 in its EmployeeID column. What does that 5 tell you?

SELECT * FROM Orders;
SELECT * FROM Employees;
Submit

When you're done, download your submission file and upload it to this unit's practice assignment in Canvas. It carries a summary of your progress and the record of every attempt you made on this page. You can submit as many times as you like; the last one counts.

Attempts are saved in this browser. To keep going on another computer, download your submission here and resume from it there.