Write an SQL statement to show the sum of HoursWorked for each Type of OWNER but exclude services of employees who have an ExperienceLevel of Junior and exclude any Type with less than three members.

Respuesta :

Answer:

select sum(HoursWorked)

from OWNER

where ExperienceLevel <> 'Junior'

group by ExperienceLevel

having count(*) >= 3

Explanation:

First use the sum function on HoursWorked column of OWNER table. Then put the required condition of not including employees with experience level of Junior. And then use group by function to bulk the results by experience level and group only results with equal to or more than 3 records.

ACCESS MORE