this is what you want:
Quote:
|
6 are not assigned to any departments
|
this is how to get it:
Code:
SELECT E.last_name
FROM Employees E
LEFT JOIN EmpDepts ED ON E.id = ED.emp_id
WHERE ED.emp_id is null and E.company_index = 63
you don't need to count as count is 0 anyway.