I have never tried to add MAXROWS to an CFOUTPUT Statement of a Group before, so I am not use it Can be done, however the only other way I can Think of is by creating your own counter and increment It by 1 each time until you get the desired number Of records.
<CFSET grpCounter = 0> <CFOUTPUT GROUP="grpQuery"> <CFSET grpCounter = grpCounter + 1> <CFIF grpCounter LTE desiredCount> .... .... .... -----Original Message----- From: Nomad [mailto:[EMAIL PROTECTED] Sent: Thursday, December 15, 2005 11:49 PM To: CF-Talk Subject: Group Query help. Hello! How do I limit the number of rows returned per group in a grouped query. My query: Select pid, Details, Brand from Products group by brand order by price This query returns: pid Details Brand 1 abcd Macromedia 2 efgh Macromedia 3 efgh Corel 4 abcf Corel 5 errer Adobe etc etc. What I want to achieve is to limit the max number of rows returned per group to say 5. So if there are 10 Macromedia products in my db only 5 rows would show up. Please note that my aim is not to limit the total number of rows returned with a Top statement or similar. Thanks in advance. Ben > Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. > http://www.houseoffusion.com/banners/view.cfm?bannerid=67 > > Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221634 > 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=11639.10644.4 > Donations & Support: http://www.houseoffusion.com/tiny.cfm/54 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227078 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54