SELECT DISTINCT product_type, COUNT(*) AS Count, severity_code
WHERE (dept = 'it- operations') AND (product_type= 'other / to be determined')
GROUP BY product_type, severity_code
ORDER BY COUNT(*) DESC, product_type
Product Type Count Severity_code
other / to be determined 310 5
other / to be determined 97 4
other / to be determined 26 3
other / to be determined 2 1
DESIRED OUTPUT IN Reporting Services table.
Product Type TotalCount SC1 SC2 SC3 SC4 SC5
other / to be determined 435 2 0 26 97 310
In reality I have 100 Product Types in the table I will need to perform this on. This is just one example.
How can I transpose a column to row as in the above example