For problems 6-10, use the QrySample.mdb database file. The schema for the datab
ID: 3762310 • Letter: F
Question
For problems 6-10, use the QrySample.mdb database file. The schema for the database is below:
1. How many orders were shipped (not placed) in October of 1997?HINT: In Access, values of dates are enclosed in #’s. For example Date = #03/04/1999#. MS Access also allows you to use:
WHERE Date BETWEEN [BeginDate] AND [EndDate] instead of:
WHERE Date >= [BeginDate] AND Date <= [EndDate]
QUERY:
7. List the company names and phone numbers of customers in ‘London’ or ‘Madrid’ who placed an order in October 1996.HINT: parentheses
QUERY:
8. List the CompanyName, Address, City, Country and Phone of customers whose company name begins with the letter ‘B’.HINT: Wildcard in Access is * (not %, like in WebSQL).
QUERY:
9.
How much revenue have we gained from customers in Argentina?
QUERY:
10.
How many times have products categorized as ‘Condiments’ have been sold to customers in the United States?HINT: CategoryName and Country are your two endpoints.How do you navigate between them on the schema diagram above.Literally use your finger and trace the path.
QUERY:
Explanation / Answer
1. select orders from qrysample where Date BETWEEN 10/01/1997 AND 10/31/1997;
7. select companyname, phone from qrysample where city ='London' or city = 'Madrid' and Date BETWEEN 10/01/1997 AND 10/31/1997;
8. select CompanyName, Address, City, Country, Phone from qrysample where companyname like 'B*';
9. select sum(amount) from qrysample where city = 'Argentina';
10. select count(product) from qrysample where category = 'Condiments';
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.