How do you know that 80% is a pass? Is it hardcoded, or being pulled from a table somewhere?Some psuedo-code (this won't work, but might give you an idea):select c.studentid, cast(c.numcorrect > 0.8 as bit) as IsPassing from (select b.studentid, (b.numcorrect / b.numtotalanswer) as percentcorrect from (select a.studentid, sum(a.IsCorrect) as NumCorrect, a.numtotalanswers from StudentAnswers a where something = somethinggroup by a.studentid, a.numtotalanswers) b) c
FischMan