In SQL Server 2005, I have a database called production that keeps track of all the code that has been deployed. There are other columns in the table, including ticket number, program type, program name, and push number.
GOAL: Count all of the DISTINCT programme names by push number and programme type.
I need to get the unique values, which I'm not getting with the following query:
DECLARE @push_number INT;
SET @push_number = [HERE_ADD_NUMBER];
SELECT DISTINCT COUNT(*) AS Count, programme_type AS [Type]
GROUP BY programme_type