(d) (10 points) Please show an SQL statement to find, for each department, the e
ID: 3709617 • Letter: #
Question
(d) (10 points) Please show an SQL statement to find, for each department, the employee has the largest start date. The result set should look like the following. the latest start EmplLastName department_id date 2010-01-01 2011-09-30 2008-01-25 Dusti (e) (10 points) Please show an SQL statement to find those cities that have at least 3 employees. Moreover, in the result set, these cities are ordered with the city that has the largest number employces first. The result set should look like the following. EmpCity Num Employees Kansas Citv 10 t. Louis4Explanation / Answer
SELECT EmpLastName, department_id, MAX(start_data) AS the latest start date FROM Employees
GROUP BY department_id;
SELECT EmpCity, count(*) FROM Employees GROUP BY EmpCity HAVING count(*) > 2;
**Comment for any further queries.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.