您好,并提前致谢!
SELECT employeeID, employeeFirstName, employeeLastName, eventID
FROM (
SELECT employee.employeeID, employeeFirstName, employeeLastName, position.positionID, position.employeePosition, eventID
FROM employee
LEFT JOIN event
ON employee.employeeID=event.employeeID
LEFT JOIN position
ON employee.positionID=position.positionID
) s
WHERE employeePosition = 'Photographer'
;
返回:
如何将a列设为每个员工完成的事件总数?这意味着每个员工只展示一次,他们所做的eventID数量总计是多少?