-1
我正在使用下面的查詢來挑選用戶最高資格但我重複的值。因爲用戶有多個資格。最大功能重複值
SELECT hrQualifications.Qualification,hrUserQualifications.HRUserID,MAX(hrQualifications.QualificationLevel) as Qlevel
FROM hrQualifications RIGHT OUTER JOIN
hrUserQualifications ON hrQualifications.QualificationID = hrUserQualifications.QualificationID RIGHT OUTER JOIN
hrUserApplyforPositions ON hrUserQualifications.HRUserID = hrUserApplyforPositions.HRUserID
WHERE (hrUserApplyforPositions.HrPositionID = 1)
group by hrQualifications.Qualification,hrUserQualifications.HRUserID
輸出,我得到
Qualification UserID QualificationLevel
B.Sc.(Hons) 12 16
F.Sc 12 12
B.Sc.(Hons) 18 16
需要輸出。我想要最高的用戶資格。
Qualification UserID QualificationLevel
B.Sc.(Hons) 12 16
B.Sc.(Hons) 18 16
需要更多信息,可能... –