A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

using the sum function?



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2004, 06:56 PM
Brent
external usenet poster
 
Posts: n/a
Default 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  
Old May 6th, 2004, 11:54 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.