Richard Cooper wrote: > > I tried grouping the data from the poll table and then used this in the > select: > COUNT(DISTINCT PR.questionAnswer) as answerCount > ,MIN(PR.questionAnswer) as questionAnswer > > But that hust returned the number of different answers. I'm looking into some > kind of sql loop but that's all new territory and I'm not sure if that's the > right direction >
SELECT p.Question,a.answer,count(a.answer) AS answercount FROM polls p LEFT JOIN pollAnswers a ON p.pollID = a.pollID GROUP BY p.Question,a.answer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266980 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

