. rind the last name of the employee whose last name is last in dictionary order
ID: 3741115 • Letter: #
Question
. rind the last name of the employee whose last name is last in dictionary order 6. Compute the employee salary standard deviation. As a reminder the tormula for the population standard deviation is as follows 7. Find the number of employecs who are assigned to some department. You may no: 8. For each department, list the department code and the number of emplcyees in the 9· tur each department that has a project, list the department code and report the 10, Mocify thie query from Problem 9 to only include departments with 2 or more 1L. Modify the query from Problem 10 to only count active projecis. Sort the resul's in 12, Find the emplovee l) of all employees where their assigned tline to work on projerts 13. Calculate the salary cost for each deparunent with employees that don't have a last use a WHERE clause. department. average revenue and count of all of its projects. projects descending order by count. is 100% or more. name ending in-re, after giving everyone a 10% raise.Explanation / Answer
--5
SELECT firstname FROM employees ORDER BY firstname DESC;
--6
SELECT (POWER((SALARY-SUM(SALARY)/COUNT(empleyeeid)),2) )/COUNT(empleyeeid) AS StanardDeviation FROM employees
--7
SELECT COUNT(employeeid) AS NoOfEmployees FROM employees WHERE deptcode IS NOT NULL;
--8
SELECT deptcode,COUNT(employeeid) AS NoOfEmployees FROM employees
GROUP BY deptcode;
--9
SELECT deptcode,AVG(revenue) AS AvgRevenue,
COUNT(projectid) As NoOfproject FROM projects
GROUP BY deptcode;
--10
SELECT deptcode,AVG(revenue) AS AvgRevenue,
COUNT(projectid) As NoOfproject FROM projects
GROUP BY deptcode HAVING COUNT(projectid)>=2;
--11
SELECT deptcode,AVG(revenue) AS AvgRevenue,
COUNT(projectid) As NoOfproject FROM projects
GROUP BY deptcode HAVING COUNT(projectid)>=2
ORDER BY COUNT(projectid);
--12
SELECT employeeid FROM workson WHERE assignetime>='100';
--13
SELECT SUM(Salary*.10+Salary) AS reSalary FROM employees
WHERE lastname NOT LIKE '%re'
GROUP BY deptcode;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.