I don' think you can get those who passed and failed in the same query using QofQ. Getting those who failed is easy:
<cfquery name="qOverall" dbtype="query"> SELECT DISTINCt userid FROM q WHERE pass = 'fail' </cfquery> Then you can use your first query and CF to display passed and failed: PaAscal > -----Original Message----- > From: Andy Jarrett [mailto:[EMAIL PROTECTED] > Sent: 20 December 2004 12:51 > To: CF-Talk > Subject: OT: SQL > > Hi there, > > I am have a table with user id and grade SQL statement. THe Table is - > > userid | grade > 1 | pass > 1 | pass > 1 | pass > 2 | fail > 2 | pass > 3 | pass > 4 | pass > 4 | fail > 5 | pass > > The output shows bascially whether the user has passed all courses. So > user 1 would be an overall 'Pass' mark as all courses are completed. > Yet user 2 would be an overall 'Fail' as he/she has one more course to > pass. > > Oh and this is a QoQ that i have to do this in. > > Any help appreciated > > Regards > > Andy J > www.andyjarrett.co.uk > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188227 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54