title: Percentage of results that have a column in SQL
body: <p>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</p>
  
  <pre><code>SELECT DISTINCT Reason, 
         COUNT(Reason) AS Number, 
         CAST(COUNT(Reason) AS float) / CAST(COUNT(*) AS float) AS percentage
  FROM DeletedClients
  </code></pre>
  
  <p>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</p>