Question: I don't know how to make it as SQL Which customers purchased vehicles from salesperson Dudley despite having a Poor, Very Poor, or Extremely Poor

I don't know how to make it as SQL

  1. Which customers purchased vehicles from salesperson Dudley despite having a Poor, Very Poor, or Extremely Poor credit rating? Show the first name, last name, and credit description for these customers.
  2. Salesperson Colin recently had an encounter with a customer who he would like to contact again. Unfortunately, Colin cant remember if the customers last name was Hansen or Hanson. Construct a query to help Colin find the correct customer to follow up with. Show the customers first name, last name, and phone number.
  3. Construct a query to count how many encounters resulted in the customer declining to make a purchase. Use the COUNT function. (Hint: a customer can have many encounters)
  4. Customers with low annual income or poor credit ratings often have trouble qualifying for credit. A new, local credit agency may be better able to serve this market segment than the current options can. The manager would like to talk to a few salespeople who have had the most encounters with these customers. Create a list that shows each salesperson (first and last name) and the number of encounters each has had with customers that have an annual income of $25,000 or less or have a credit description that is Very Poor or Extremely Poor. Order the results alphabetically by the salespersons last name. Your query should have three columns: sFirstName, sLastName, encounter_count.
  5. Generate a query to find the average income of customers who purchased a car on their interaction.
  6. Construct a query to show customers with an annual income greater than $100,000 who have a credit rating of Fair, Poor, Very Poor, or Extremely Poor. Show each customers first name, last name, credit description, and annual income.
  7. Management is considering closing on Sundays and would like to have a feeling for the kinds of customers that come to the dealership on Sunday. Create a totals query that shows the count of encounters on the Sundays of July 2015grouped by the credit description held by the customer of the encounter. The Sundays in July of 2015 are the 5th, 12th, 19th, and 26th. Your answer should have two columns (CreditDescription and encounter_count) and should be sorted alphabetically by credit description.

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!