GROUP BY Question
Posted in 1998
We have a Journal Entry table that needs to be reported on and summarized at several different levels. Some questions: 1) If I do a GROUP BY (col1, col2, col3) will it summarize at each of those levels? So if I want to see totals by Date, Payer, and Category, will this GROUP BY do that? 2) Is there a way to preserve the detail records that went in to the summarization? On the printed report, it will not be sufficient to simply show the aggregated values. They will also want to see the records that contributed to the final result. 3) Although groups are not guaranteed to be sorted, can I add a SORT clause following the GROUP BY clause, and have the resultant groups be sorted? Thanx! -- Jake Colman Principia Partners LLC Phone: (201) 946-0300 Harborside Financial Center Fax: (201) 946-0320 902 Plaza II Beeper: (800) 505-2795 Jersey City, NJ 07311 E-mail: colman@ppllc.com E-mail: jcolman@jnc.com web: http://www.ppllc.com