I am trying to get a results that will show Uniuque "Reasons", the number of them there are, and the percentage of the total that they are. so far I have
SELECT DISTINCT Reason,
COUNT(Reason) AS Number,
CAST(COUNT(Reason) AS float) / CAST(COUNT(*) AS float) AS percentage
FROM DeletedClients
However as I have discovered COUNT(*) and COUNT(Reason) give the same result. So my basic question is, how do i get the total number of rows when I am using distinct in the query? I am using SQL server 2005