question

rupikagpt avatar image
rupikagpt asked

Group Data based on value match in either of the three columns

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 togethersqlserver-question.png

Can anybody help with how to achieve it in T-SQL

ssmsgrouping
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.