Question: Question: Practice using these three tables, what are the best queries for MySQL according to the situational scenarios? Table - Customer CustomerID - Primary Key

Question:

Practice using these three tables, what are the best queries for MySQL according to the situational scenarios?

Table - Customer

CustomerID - Primary Key

CustomerFirstName

CustomerLastName

CustomerPhone

AnnualIncome

CreditRating

Table - Encounter

EncID - Primary Key

SalesPersonID - Foreign Key

CustomerID - Foreign Key

EncDate

Purchase (Yes or blank)

Table - Salesperson

SalesID - Primary Key

SalesFirstName

SalesLastName

SalesHireDate

SalesSalary

5.Practice creating, customers purchased vehicles despite having a Poor, Very Poor, or Extremely

Poor credit rating? Show the first name, last name, and credit description for these

customers.

6.Practice creating, Salesperson Thomas recently worked with a customer who he would like to contact again.

Unfortunately, he cannot quite remember if the customer's last name was Smith or

Smithe. Construct a query to help Thomas find the correct customer to follow up with.

Show the customer's first name, last name, and phone number.

7.Practice generating a query to find the average income of customers who purchased a car on their

interaction.

8.Practice constructing a totals query to examine the relationship between salespeople and the annual

income of the customers they target in their interactions. Show the salespeople's first name

and the average annual income of their customers in your result. You do not need to

include a criterion for Purchase in this query.

Thank you for any help in understanding how to create these situations.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!