Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions