CodeID Status FO1 FREE FO2 NOT FREE FO1 FREE FO1 FREE FO1 FREE
select count(distinct Status) from TableName where CodeID = 'FO2' and Status ='FREE'
SELECT COUNT(Status) FROM TableName GROUP BY CodeID, Status HAVING CodeID = 'F01' AND Status != 'FREE'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)