Ok, I ALMOST got it! The results that are incorrect is just the number of 
answers per question. 

Here's what the query returns: 

http://wtomlinson.com/evalQRYs/qryData.jpg

Look at numAnswers. I completed two evaluations. But numAnswers should be the 
total count of each answer that was given. I obviously didn't answer twice for 
every answer as shown in the query results. 

I need it to count up the number of answers that were chosen, for each answer, 
for each question. 

Here's my query as it stands now:

ALMOST! 

SELECT
Q.questionID,
Q.questionsetID,
Q.question,
Q.answersetid,
ARS.answersetid,
ARS.answersetname,
A.answerID,
A.answersetID,
A.answername, 
A.answersortnum, 
A.answervalue,
EAR.evalID, 
EAR.answerID,
E.evalID,
E.InstructorID,
 
COUNT(EAR.answerID) AS numAnswers

FROM   tblquestions Q  
INNER JOIN   tblanswersets ARS
 USING (answerSetID)
 INNER JOIN   tblanswers A
 USING (answerSetID)  
 LEFT JOIN  tblevalanswerresults EAR
 USING (questionID)
 INNER JOIN tblEvaluations E ON
 E.evalID = EAR.evalID
WHERE  E.InstructorID = '1021338' 
 GROUP BY   Q.questionID, A.answerID

Thanks,
Will

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273191
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to