I need this output through creating view , can you please advice here
Customer Group Tariff Combinations Count AvgAnnualSpend
A 11 1902 2,198.00
11 and 31 324 1,866.00
11 and 31 and SA or SSA 94 1,258.00
I'm using aws redshift so I can't use CUBE or ROLLUP, I've attached file to better viewing.