If I have at table with, say 10 columns. 8 columns of data and 2 columns (1 and 2) as an identifier.
I would like to calculate “the result” for the 8 columns, for every possible scenario of col1 and col2.
Assume distinct(value) col1 gives {A,B,C} and distinct(value) col2 gives {D,E,F} I would like to sum up the data (any of the 8 columns) GROUP’d BY:
- A,D
- A,E
- A,F
- A,(All of col2)
- B,D
- B,E
- B,F
- B,(All of col2)
- C,D
- C,E
- C,F
- C,(All of col2)
- (All of col1),(All of col2)
- D, (All of col1)
- E, (All of col1)
- F, (All of col1)
1 Answer