Vince Teachout wrote: > I must not be understanding the problem. This works fine for me in vfp7: > SELECT stylename, sum(units) as sumall FROM gmoodet GROUP BY stylename > ORDER BY sumall > I'm learning here. ;-) That's close, that gives me a one record for each rider with a "sumall" field showing the total. I need all the records in the table to show in the report sorted by the order that the above came up with. i.e., sorted by the Names, but in the order of the Totals. I hope I'm making sense! Actually the example below should be descending instead of ascending, but that's an easy part.
Main Heading Name1 01/01/07 50 01/01/07 25 Total-> 75 Name2 01/01/07 40 01/01/07 44 Total-> 84 Name3 01/01/07 45 01/01/07 44 Total-> 89 -- Regards, Chester Friesen Friesen Computer Company Willows, CA _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.