title: Display %change using SQL Server
body: <p>Happy New Year!</p>
  
  <p>I was wondering if we could write a SQL query in SQL Server that displays the %change. </p>
  
  <p>Example, I am running this simple query with the output:</p>
  
  <pre><code>Select location, item_sold
  from product
  
  Location    Item_sold
  VA           20
  CA           57
  DC           44
  MA           75
  FL           101
  </code></pre>
  
  <p>Now, I would like the desired output as follow, which take the item sold from each location divided by the total.</p>
  
  <pre><code>Location    Item_sold         %Chg
  VA           20              7%
  CA           57              19% 
  DC           44              15%
  MA           75              25%
  FL           101             34%
  TOTAL         297
  </code></pre>