I am using strings entered as macro variable to run the by statements:
% let string = a b c d e;
create table temp as
select &string, Sum(x), avg(y) from x
group by &string.
In this case the result I want are the combination of a b c d e groupings ...
That is one result should have a= All and calculate group by as b c d e
then calculate group by using b = All and group by a c d e
then calculate group by using a = All and b = All group by c d e
Similarly results when a = All , b = All , C = All so on ...
Basically I want to get all possible combinations I could get with these five group by variables in the string ....
What would be the best way to approach something like this??