Question
From the AdventureWorks SQL Server test relational database: The sales manager frequently receives customer feedback in the form of sales representative compliments from customers. However,
From the AdventureWorks SQL Server test relational database:
The sales manager frequently receives customer feedback in the form of sales representative compliments from customers. However, customers do not always remember the names of the specific sales representatives who provided outstanding service. Over the past several weeks, one store in particular has received multiple positive compliments for service, and the sales manager has asked you to help him search for the employee who has been the source of the numerous positive customer comments. The sales manager provides you with the store name, The Bike Mechanics, and asks you to identify the employee based upon this information.
Please note that when SQL queries are run, results are generated in the form of data. This data should be exported and saved to Excel for a visual check of accuracy.
Create a Word document that includes the SQL query code used to explore the AdventureWorks database tables and answer the following questions.
Write a query to get the employee's name using the Person table and the job title from the Employee table. Using the SalespersonID from the Store table, create as subquery in the WHERE statement to locate the specific employee. Create two columns for the output "Full Name." Create a column for the "Job Title." Using the data from question 1, create a new table titled "Compliments" and house it under the Sales schema by adding the BusinessEntityID. Insert your record into the new table. Display your TSQL code for each step of the process. The new table you have created is not efficient and normalized. Explain and propose potential solutions for obtaining an efficient query while still meeting the Sales Manager's needs.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started