Grouping and totals

mardi 31 mars 2015

I am trying to group my results of this query by ExamId and total by the number of correct answers. My results are very simplified granted. The "0" & "1" for "Correct" is a binary.... Thanks for any help!



SELECT A.ExamId,

A.QuestionId,

A.AnswerId,

A.Answer,

A.Correct,

FROM ExamAnswers A



the results currently appear like this:



ExamId QuestionId AnswerId Answer Correct

1 1 152 Blue 0

1 2 207 Aqua 1

1 3 166 Mauve 0

2 1 152 Black 1

2 2 207 Aqua 1

2 3 166 Mauve 1

3 1 152 Black 1

3 2 207 Green 0

3 3 166 Beige 0

Grouping and totals

0 commentaires:

Enregistrer un commentaire

Labels