【发布时间】:2023-02-07 23:57:49
【问题描述】:
SELECT [P-EmpList].LastName, [P-EmpList].FirstName, ProjectCrewAllocation.SAPID, ProjectCrewAllocation.To, ProjectCrewAllocation.IntProj
FROM [P-EmpList] INNER JOIN ProjectCrewAllocation ON [P-EmpList].SAPID = ProjectCrewAllocation.SAPID
SELECT CONCAT (LastName, '', FirstName) AS 'Tech Name',
MAX (To) As 'Most Recent Date'
FROM ProjectCrewAllocation
GROUP BY LastName, FirstName
ORDER BY 'Most Recent Date' DESC;
我无法弄清楚如何提取员工的姓名以及他们执行工作的最新日期。每个员工有多个字段,我只想要最近的一行。