Hi..I need to write a query that performs some summary information on a group of packages and I need it to be broken down into weight groupings..For example, I need the count and total weight of all packages from 1-5 lbs, then 6-10 pounds, then 11-20 lbs and so forth...SO far, my only idea is to use unions like so...SELECT '1-5' as WeightBreak, Sum(Weight) as TotalWeight, Count(Weight ) as Pkgs WHERE Weight BETWEEN 1 and 5UNIONSELECT '6-10' as WeightBreak, Sum(Weight) as TotalWeight, Count(Weight ) as Pkgs WHERE Weight BETWEEN 6 and 10UNIONSELECT '11-20' as WeightBreak, Sum(Weight) as TotalWeight, Count(Weight ) as Pkgs WHERE Weight BETWEEN 11 and 20
Is there a better way to go about this?Thanks for any help!-Greg