Do a query of your original query, and sort differently the second go-round?
Jamie On Tue, 4 Dec 2001 23:53:01 -0500 (EST), in cf-talk you wrote: >I have several instances where I need to group by more than one condition. > >For example, I create a sales report where I show BY DAY the total of >orders and their status (shipped, cancelled, etc). I'm already grouping by >day to get the daily totals, how can I also group by status? As it is, I >do a separate day-grouped query for each status and output each one into a >structure that I then display (and graph)... > >Another example is inventory. I have products of varying conditions in >different types of locations. I want to show a table of condition/location >like this: > > Online Overstock >New 56 355 >Used 34 234 >Crap 34 39 > >I can do one query and group by condition (I have to sum the quantity from >multiple inventory locations to get that one number, that's where my group >function goes). Then I have to do another query to group by type of >location. But that gives me separate totals like this: > >Online 124 >Overstock 628 > >and > >New 411 >Used 268 >Crap 73 > >Any ideas? > >Tony Schreiber, Senior Partner Man and Machine, Limited >mailto:[EMAIL PROTECTED] http://www.technocraft.com > >http://www.simplemessageboard.com ___Free Forum Software for Cold Fusion >http://www.is300.net ___________The Enthusiast's Home of the Lexus IS300 >http://www.digitacamera.com ______________DigitA Camera Scripts and Tips >http://www.linklabexchange.com _____________Miata Link ECU Data Exchange > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

