Open “MIS Lab Exam 2020-4-30” file and save it as “MIS Lab Exam (Your First Name) 2020-4-30” before working on the problems below.
- On the table SalesOrderHeader, set a validation rulesuch that OrderDate should be earlier than DueDate and provide an error message when the rule is not kept during the data entry on the OrderDate and DueDate. (2 points)
- On the table StateProvince, set up a table-based Lookup tablefor the data field CountryRegionCode that displays the names of the table CountryRegion, instead of the abbreviated CountryRegionCode. (2 points)
- Using the table SalesOrderHeader, set up a query, SalesQ4_query, that displays SalesOrderID, OrderDate, TotalDue, for the orders made in the fourth quarter of year 2001, that is, from 10/1/2001 to 12/31/2001 inclusive. “Inclusive” means dates 10/1/2001 and 12/31/2001 are included in the Q4 range. (3 points)
- Using the table SalesOrderHeader, we want to know how much each SalesPerson has sold in year 2001. Set up a query, SalesPerformance_query, that displays SalesPersonID and sum of SubTotal in the year 2001. (3 points)
- Using table SalesOrderDetail and table Product, create a query ProductSales_querythat displays ProductID (from table Product), Name (from table Product), LineTotal (from table SalesOrderDetail) in descending order, including the products that didn’t make any sale even. You will need Left Join or Right Join to display all the products in the table Product. (3 points)
- Create a query, SalesByStateProvince_querythat displays StateProvinceCode (from table StateProvince) and “SumOfTotalDue” as the sum of TotalDue (from table SalesOrderHeader) in descending order and in currency format for each StateProvinceCode. Use Relationship Diagram to find related tables for the query. (3 points)
- Using OrderedItems query, set up a crosstab, SaleByCustomerAndProductCategory_Crosstabthat displays sum of sale amount ([UnitPrice]*[OrderQty]) by each Customer and each ProductCategory, with the SaleTotal (SaleTotal: [UnitPrice]*[OrderQty]) per each customer. (3 points)