I am trying to group data from a table based on three different column value and will need to sum them up later based on the grouping .
I know I can't get the desired output , but as closest I can get. I would like to group customers based on Business name , if that doesn't match then group it on special discount group and if that also doesn't match then group it on special billing group and to add their revenue together
Can anybody help with how to achieve it in T-SQL