加入我想找到數最多的員工數據庫在職職工的部門經理的職務是其結構data structure複雜的子查詢,並在MySQL
SELECT title ,dept_name
FROM titles
JOIN dept_manager as j ON titles.emp_no = j.emp_no
JOIN (SELECT y.dept_no,EmployeeCount FROM departments as y JOIN (SELECT
count(*) as EmployeeCount, dept_no FROM dept_emp WHERE to_date = '9999-01-
01' GROUP BY dept_no ORDER BY EmployeeCount Desc Limit 1) AS n ON y.dept_no
= n.dept_no)
AS s ON j.dept_no = s.dept_no limit 1;
這必須是查詢它根據它,但它不工作我得到迷茫普萊舍找幫我
沒有人會爲你解決任務。我建議你嘗試通過子任務來分離整個任務,並向前邁進,以使一切正確。 – hastrb