I have written a query like this
CASE
WHEN [col1] = 's' THEN '1'
WHEN [col1] = 't' THEN '2'
WHEN [col1] = 'u' THEN '3'
WHEN [col2] = 'v' THEN '4'
.......
END AS product,
SUM(col3)
FROM dbo.TableA
I want group by on product? How to do that?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With