I need help writing the SQL for Microsoft Access for these. Find all employees w
ID: 3799515 • Letter: I
Question
I need help writing the SQL for Microsoft Access for these.
Find all employees who are not assigned to a project List all Lastnames that appear in the employees table more than two times (you may have to modify one or two for testing). Each such lastname should only appear once in the output List all salaried employees whose salary is at least 3 standard deviations above the average salary for all salaried employees Develop a parameter query that will ask for a min and max age for filtering employees to return Write a query that returns department names as column headers, job class as row headers, and shows the total accrued sick leave for each job class/department combination.Explanation / Answer
(1) Find all employees who are not a assigned to a project:
SELECT Eno, Ename FROM Emp WHERE Eno NOT IN (SELECT DISTINCT PRJCT FROM Emp WHERE PRJCT IS NOT NULL)
(2) SELECT DISTINCT LastNames FROM Employees;
(3) SELECT employeeid, firstname,lastname FROM employees WHERE salary > ( SELECT AVG(salary) FROM employees ) + STDEV(3);
(4) select min(age) and max(age) from employees;