Or use a query of queries. The arraySum method is probably more performant, but the QofQ method is likely easier to understand what's happening and why.
On Thu, Dec 18, 2008 at 10:52 AM, Charlie Griefer <[email protected]> wrote: > arraySum(listToArray(valueList(myquery.quantity))) > > On Thu, Dec 18, 2008 at 10:46 AM, patrick buch > <[email protected]>wrote: > >> Hi, >> >> Now I know you can sum in the query to the db. I was wondering though, is >> there a way to sum on the results you get back from a query through CF? For >> instance: >> >> Results of query >> Fruit Quantity >> apple 3 >> apple 2 >> total: 5 >> >> Something like: >> >> cfset qSum = sum(myquery.quantity) >> >> Total of fruit: #qSum# >> >> Thanks... Hope this makes sense. >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316919 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

