Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to select the lowest values from table per client sql

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #lowest #values #table #client #sql
ADD COMMENT
Topic
Name
5+5 =