select count(shoes.shoecolorid) AS colorCount, shoecolor from shoecolor inner join shoes on shoecolor.shoecolorid = shoes.shoecolorid group by shoes.shoecolorid, shoecolor.shoecolor
-----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? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 beta â Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281876 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

