title: Division between the sum of two columns
body: <p>I need to take the sum of two columns and divide the totals.  Both columns are of decimal data type.  Here is what I have so far which does not work.  </p>
  
  <pre><code>SELECT total_salary / DistEnroll
  FROM   dbo.vw_Salary
  WHERE  DistEnroll = (
             SELECT DISTINCT(distenroll)
             FROM   dbo.vw_Salary
             WHERE  YEAR = '2012'
                    AND dist_name = 'Sch Dist'
         )
         AND total_salary = (
                 SELECT SUM(total_salary)
                 FROM   [vw_salary]
                 WHERE  YEAR = '2012'
                        AND dist_name = 'Sch Dist'
             )
  </code></pre>