SELECT t1.*
FROM employees t1
INNER JOIN (
SELECT id, min(salary) AS salary FROM employees GROUP BY id
) t2 ON t1.id = t2.id AND t1.salary = t2.salary;
SELECT DISTINCT
t1.CompliancyID ,t1.[Status],t1.FK_ClientID
FROM #VettingCompliance t1
INNER JOIN
(
SELECT FK_ClientID, min(CompliancyID) AS CompliancyID FROM #VettingCompliance GROUP BY FK_ClientID
) t2 ON t2.CompliancyID = t1.CompliancyID AND t1.FK_ClientID = t2.FK_ClientID