deloused
asked on
Select Row Where Column 1 is Unique
I need help with a select statement. I would like to have something like the SQL below, except only return values where the Project.JobNumber is unique. I would like also to take the last ProjectStatus.StatusDate as the tie breaker. Please let me know how this can be done. Thanks!
SELECT Project.JobNumber, ProjectStatus.StatusType, ProjectStatus.StatusDate, ProjectStatus.AssignDate, Project.ID, StatusType.Description
FROM Project INNER JOIN
ProjectStatus ON Project.ID = ProjectStatus.ProjectID INNER JOIN
StatusType ON Project.Status = StatusType.ID AND ProjectStatus.StatusType = StatusType.ID
ORDER BY Project.JobNumber, ProjectStatus.StatusDate
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome!
ASKER