Question: Please Provide an answer in MYSQL workbench Write a SELECT statement that returns one row for each employee in the employee table. Additionally return the

Please Provide an answer in MYSQL workbench

Write a SELECT statement that returns one row for each employee in the employee table. Additionally return the count of customers for each employee. If the employee has no associated customers list the employee anyway. Display the employee first name and last name and the count of customers.

employee table:

columns:

EmployeeId int(11) AI PK
LastName varchar(20)
FirstName varchar(20)
Title varchar(30)
ReportsTo int(11)
BirthDate datetime
HireDate datetime
Address varchar(70)
City varchar(40)
State varchar(40)
Country varchar(40)
PostalCode varchar(10)
Phone varchar(24)
Fax varchar(24)
Email varchar(60)

customer table:

columns:

CustomerId int(11) AI PK
FirstName varchar(40)
LastName varchar(20)
Company varchar(80)
Address varchar(70)
City varchar(40)
State varchar(40)
Country varchar(40)
PostalCode varchar(10)
Phone varchar(24)
Fax varchar(24)
Email varchar(60)
SupportRepId int(11)

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!