My Table has a Key called KeyID, and a Foriegn Key called FKey,it has a series of tests mytest and is segmented by a type myType. It has a result of PassFail which is a bit and a date at which it occurred TimeStamp. What I want is how many FKeys passed the first time through the test. This is what I have, but it does not seem correct or proficient.

SELECT
MyType,
myTest,
Count(*) as NumberTested,
Sum(Convert(INT ,(PassFail)))...