If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
using the sum function?
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???? |
#2
|
|||
|
|||
using the sum function?
"Brent" wrote in
: 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 |
Thread Tools | |
Display Modes | |
|
|