title: Calculate percentage of salary by each Employee
body: <pre><code>ID  Name     Age    Salary  running_total   Percentage
  1   Abe      61     140000  140000             0
  2   Bob      34     44000   184000             0
  5   Chris    34     40000   224000             0
  7   Dan      41     52000   276000             0
  8   Ken      57     115000  391000             0
  11  Joe      38     NULL    391000             NULL
  </code></pre>
  
  <p>I want percentage column of salary as  (Salary/TotalSalary) * 100.</p>
  
  <p>I have tried this but it is always giving 0.</p>
  
  <pre><code>  Select [ID]
        ,[Name]
        ,[Age]
        ,[Salary], Sum(Salary) Over(order by Id) As running_total, [Salary]/Sum(Salary)  Over() as Percentage
    From [Company].[dbo].[SalesPerson]
  </code></pre>
  
  <p>I am even not able to apply multiplication operation. Query gives error on applying multiplication by 100.</p>
  
  <pre><code>Incorrect syntax near the keyword 'Over'.
  </code></pre>