Querying the Book Corner Bookstore Database
The Book Corner is a small, local bookstore that sells to both recreational readers and the local college student population. The manager uses Access to track inventory, customers, and transactions. You have been asked to perform advanced queries that will help the management team make important business decisions. To keep the file small while you work with the database, the store manager removed most of the data and left only some sample data. Once the store manager accepts your changes, she will load all the data and implement the new database.
For the purpose of grading the project you are required to perform the following tasks:
Start Access. Open the downloaded Access file nameda03ws06_grader_h1.accdb. Save the file with the namea03ws06BookCorner_LastFirst replacing LastFirst with your name. Enable the content if necessary.
Create a query in Design view based on the tblShipments and tblTransaction tables that displays the TransID and a calculated field titled DaysToShip that calculates the number of days it took to ship the items from the date purchased using the DateDiff function.
Sort the results in Descending order by DaysToShip. Save the query as qryDaysToShip and then close the query.
Create a query in Design view that is based on the tblInventory table. Display InventoryID, Price, and a new calculated field called NewPrice. The NewPrice should be 25% more if the book is OutofPrint and 10% more if not. Both values should be rounded to the nearest dollar.
Format the NewPrice field as Currency. Save the query asqryNewPriceRounded and then close the query.
Create a query in Design view based on the tblInventory table to help determine when to order additional copies based on the NumberInStock. Display InventoryID, BookTitle, and a calculated field called OrderStatus. If there are seven or more copies in stock then display None. If there are between four and six copies in stock then display Critical. For those with fewer than four in stock display Urgent.
Limit the results to only those books that are not OutofPrint. Do not display the OutofPrint field in the query results. Save the query as qryOrderStatus and then close the query.