我有下表,我们在其中存储项目计划:
ID PROJECT_NAME MILESTONE_NAME
所有里程碑都以数字开头,例如“0.1 - 里程碑描述”。
我想检索按项目订购的 MAX MILESTONE_NAME。
我使用了以下代码,但它不起作用......
SELECT Sheet1.[PROJECT_NAME], MAX(Sheet1.[MILESTONE_NAME])
FROM Sheet1 INNER JOIN Sheet1 AS Sheet1_1 ON (Sheet1.[PROJECT_NAME] = Sheet1_1.[PROJECT_NAME]) AND (Sheet1.[MILESTONE_NAME] = Sheet1_1.[MILESTONE_NAME])
ORDER BY Sheet1.[PROJECT_NAME]
它说 PROJECT_NAME 不在聚合函数中。
你们知道我应该如何前进吗?
谢谢!