Unit 02 · Practice
Practice
Use the Northwind database for all practice questions.
This is the first practice where you write queries. Type your query in the box and click Run, or press Ctrl + Enter (Cmd + Enter on a Mac). The result shows up underneath, and the page tells you whether it matches. If it doesn't, it will usually tell you what's off, like too many rows or the wrong columns.
Run as many queries as you want. It's normal to run a plain SELECT * just to look at a table before you write the real query. All of it goes in the question's history, and a messy history is fine.
The Tables panel on the right lists every table and its columns. If you don't see it, click the blue Tables button in the bottom right corner. You don't need USE northwind; here. If you type it, it just gets ignored.
Part 1 is ten queries to write. Each one is checked, and the page tells you whether your result matches.
Part 2 is five questions where you use queries to answer something.
Everything you run on this page is recorded and goes into your submission.
employees table.products table.Product, Price, Sale Price.products table where the price is between 15 and 25.products table that have 'chef' in their product name.customers table that are located in either Germany, France, or Spain.products table that have a CategoryID of 1 and a price greater than 20.employees table, ordered from youngest to oldest. Show first name, last name, and birth date.customers table, sorted first by their country in reverse alphabetical order and the customer's name in alphabetical order.products table, cheapest first. Show the product name and the price.For questions 12 and 13, run whatever queries you need to find the answer, then enter your final answer.
Write a query that shows only the customers in Germany. How many are there? The number of rows is shown under your result.
Find Northwind's youngest employee. How many orders have they taken?
This takes two queries. The first one finds the youngest employee, and you read their EmployeeID from the result. The second one uses that EmployeeID to show only their orders from the orders table. The number of rows is shown under the result.
A manager asks for every product that costs 40 or more, with the most expensive at the top. All four of these queries run without an error. Which one gives the manager what they asked for?
The products table doesn't say "seafood" or "dairy" anywhere. It has a CategoryID. Look in the categories table to find the two IDs you need. If you get too many rows back, check how your AND and OR are grouped.
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.