Actually, I would try to stay away from count(*) IMO. Count an actual field.
Nicholas M. Tunney Blog: http://www.nictunney.com Adobe Certified Advanced ColdFusion MX7 Developer Adobe Certified Instructor Adobe Community Expert Dawson, Michael wrote: > SELECT > color > ,COUNT(*) AS colorCount > FROM > ShoeTable > GROUP BY > color > > M!ke > > -----Original Message----- > From: Les Mizzell [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 21, 2007 11:12 PM > To: CF-Talk > Subject: RecordCount and Sub(?) Counts? > > I can think of all kinds of evil "use a loop" and stuff to do this, but > what's a more compact way, or is there one? > > Stupid Example - a query that returns shoes > > 100 total shoes returned (shoeQUERY.recordcount) > > How can I get the query to also tell me there's 45 red shoes, 15 blue > shoes and 40 green shoes without doing dome kind of loop with a counter > outside the query? Or can you? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281874 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4