Spring Term, 2006, BA271 Query Exam
This quiz is open-book, open network. So feel free to browse the
class website or the Course Technology textbook for hints or pointers.
If you have questions about these ground rules, please discuss
them with Dave Sullivan before continuing.
Instructions:
Answer1: What products have Ann Devon bought
from Davolio?
- Product Name should come from the Products table.
-
Ann Devon is a ContactName in the Customer table,
and Davolio is a LastName in the Employee table.
- Sort in ascending order by Product Name.
- Hide the ContactName and LastName fields so they do not
appear in your answer.

|
Answer2: Management is concerned
that too many large orders are being delivered late. Write a query
that lists the Supplier table's Contact Name, Sales
(calculated as Quantity times Unit Price) and Order
Date for all orders whose Order Date was in the last
three months of 1995 and where the Required Date minus the
Shipped Date is negative.
- Contact Name should come from the Suppliers table.
- Limit the attention of the query to only those sales where the
Order Date is in the last three months of 1995.
- List only those transaction where the Required Date
is less than the Shipped Date.
- Sort the query in descending order based on Sales.

|
Answer3: Which Company has shipped the most
items of Produce to Germany?
- Category Name should come from the Category
table.
- Country should come from the Customer table.
-
Company Name should come from the Shipper table.
- Sort the query in descending order based on
the Count of Items Shipped.
- Note: the query shown
below counts how many items were shipped to France -- but your
query should count how many items were shipped to Germany.

|
Answer4: What are the top 5 companies that have
bought Produce?
- Company Name should come from the Customer table.
- Category Name should come from the Category
table.
- Total Net Sales should be calculated from the Order
Details table as Unit Price times Quantity
times 1 minus the Discount rate.
- Sort the query in
descending order by
Total Net Sales.
- Make sure you write a "top 5" query so that only the five
best companies appear in your answer.
- Note: the image below shows which companies bought the
most Beverages, not which ones bought the most Produce.

| |