using the sum function?

B

Brent

I have a database that is used to tally quiz results.
The DB has three tables, one is where user information is
collected including their answers, the second table
includes a list of questions, and the third includes a
list of values corresponding to the quesitons. For
instance, there are four questions for every answer, but
only one quesiton has a value of 1 (true) and the other
three (wrong) questions have a value of 0.

What I'm having trouble doing is putting together a query
that tallies the number of 1's and 0's for every person
who takes the quiz. Any suggestions????
 
T

Tim Ferguson

What I'm having trouble doing is putting together a query
that tallies the number of 1's and 0's for every person
who takes the quiz.

SELECT PersonName, SUM(AnswerValue) AS TotalCorrect
FROM CorrectedAnswers
GROUP BY PersonName
ORDER BY 2 DESC;

HTH


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top