Jochem, this is close but not quite giving me the results I'm after.

Here's the data as it looks in the table. I answered three questions, each had 
a choice of 5 answers. I chose 1 answer for each question. 

Here's the data as it appears in the tblEvalAnswerResults many table. 

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

Here's the qry: 

SELECT
Q.questionID,
Q.questionsetID,
Q.question,
Q.answersetid,
ARS.answersetid,
ARS.answersetname,
A.answersetID,
A.answername, 
A.answersortnum, 
A.answervalue,
EAR.evalID, 
EAR.answerID,
A.answerID, 
COUNT(EAR.answerID)
FROM   tblquestions Q  
INNER JOIN   tblanswersets ARS
 USING (answerSetID)
 INNER JOIN   tblanswers A
 USING (answerSetID)  
 LEFT JOIN  tblevalanswerresults EAR
 USING (answerID)
 GROUP BY   A.answerID

Here's the data the query returns:

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

Notice how it's indeed returning 5 rows - 1 per answer choice. But It's also 
just returning 1 question. There were 3 questions answered. I've played with it 
some and will keep trying. 

Any ideas?

Thanks much,
Will 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273179
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