title: SQL Server - Divide sum of columns
body: <p>I am trying to divide sum of two columns and SQL is not giving me precise number in decimal.Please check below queries. I don't know what I am missing here.</p>
  
  <p>Data type of PAYEE and TOTAL is decimal(10,2)</p>
  
  <p>Queries</p>
  
  <pre><code>SELECT SUM(PAYEES) AS SUM_PAYEES,SUM(TOTAL) AS SUM_TOTAL,SUM(PAYEES)/SUM(TOTAL) AS DIVISION FROM #ADMIN_FEE_1
  
  SUM_PAYEES  SUM_TOTAL   DIVISION
  19940.00    59435.00    0.335492
  
  SELECT 19940.00/59435.00 AS DIVISION
  
  DIVISION
  0.3354925548
  </code></pre>
  
  <p>Is this a bug in SQL Server? Is there way to get correct answer?
  Any help is appreciated. Thanks</p>