查询:
select
d.Name as DepartmentName,
c.FirstName + ' ' + c.LastName as Name,
Max(SickLeaveHours) as 'Total Sick Leave Hours'
from
HumanResources.Employee e,
Person.Contact c,
HumanResources.EmployeeDepartmentHistory edh,
HumanResources.Department d
where edh.DepartmentID=e.EmployeeID
and edh.EndDate is Null
and d.DepartmentID=edh.DepartmentID
group by d.Name
order by 'Total Sick Leave Hours' DESC
对于我的生活,我无法弄清楚如何使这项工作。如何添加名字和姓氏?