title: Calculate percentage value for each row based on total column value in SQL Server
body: <p>I have a table like below. I need to calculate percentage value for each row based on total column value. How to achieve this with a SQL query?</p>
  
  <p><a href="https://i.stack.imgur.com/Ce7oi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ce7oi.png" alt="enter image description here"></a></p>
  
  <p>I am expecting results like this:</p>
  
  <p><a href="https://i.stack.imgur.com/YxxaW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YxxaW.png" alt="enter image description here"></a></p>
  
  <p>Please find the below simple calculation to get result. </p>
  
  <pre><code>(100 / 1000) * 100 = 10
  </code></pre>
  
  <p>for the first value.</p>
  
  <pre><code>(row value / grand total) * 100
  </code></pre>
  
  <p>Can you please help me to get 10 as result for the first row value with a SQL query? Thanks in advance. </p>