I am learning SQL at university. Stuck one a question and any help would be appreciated.
Question:
Write a SQL statement to retrieve the first and last name as a column “fullname” of the employees which manage 2 or more projects (2pts).
Background info:
EMPLOYEE Table with 2 entries, PROJECT Table with 4 project tables. Last column is ProjectManager which has the Employee ID. Two of the projects are managed by the same employee.
What I have:
Select EMPLOYEE.FirstName+','+EMPLOYEE.LastName AS FullName
FROM EMPLOYEE
WHERE count(PROJECT.ProjectManager==EMPLOYEE.EmployeeID) > 1
EDIT: Sorry for the confusion guys. Its a PROJECT table with 4 records. I needed to find the first and last name of the Employee whose ID was listed under 2 different project records. The employee ID went in the ProjectManager column. The answer Serif Emek gave seems to be what I needed.