Practice 89 1. Find the average salary fot all employees. 2. Find the minimum an
ID: 3741103 • Letter: P
Question
Practice 89 1. Find the average salary fot all employees. 2. Find the minimum and maximum project revenue for all acuve projecis that make muney 3. Find the number of projects that are completed. You may not use a WHLRE clause. 4. find the number of projects that have been worked on ot currently are being worked on by an employee. . rind the last name of the employee whose last name is last in cictionary order 6. Compute the employee salary standard deviation. As a reminder the formula for the pepulation slandard deviation is as follows x, -x) 7. Find the number ot employecs who are assigned to some departmen. You may no: 8. For each department, list the department code and the number of empleyees in the 0. tur each departiment that has a project, list the department code end report the 10. Mocity thc query from Problem 9 to only include departmenis with 2 or more 11. Modify the query from Problem 10 to only count active projecis. Sort the resulis in 12. Find the emplovee ID of all ensplayees where theirassigned tizme to work on projects 13. Calculate the salary cost for each deparunent with employees that don't have a last use a WHERE clause. departmerst average revenue and count of all ot its prcjects projects descending order by count is 100x or mare. name ending in re after giving everyone a 1ox raise.Explanation / Answer
Answer is as Follows :
According to Chegg's Policy I will Provide the answer for First Four questions, Please Repost Others..
1) Select AVG(salary) FROM employees ;
Use avg function to calculate average.
2) Select MIN(revenue) AS MIN, MAX(revenue) AS MAX FROM projects WHERE description = 'Active ' ;
min and max function are used to calculate min and ,max value of revenue and where clause is used to identify active projects.
3) SELECT COUNT(projectId) FROM projects WHERE description = 'Completed' ;
count function is used to counnt projects and where clause is used to identify completed projects.
4) SELECT COUNT(projectId) FROM projects JOIN workson ON projects.projectId = workson.projectId WHERE count(employeeid) = '1' ;
first count funtion is used to count projects and join is used to join two table i.e. projects and workson to get the no of employees and second count function is used to calculate the number of employees and where clause is used to get employee no is 1.
if there is any query please ask in comments...
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.