title: SQL Query to Sum Columns for each category
body: <p><img src="https://i.stack.imgur.com/qgwPq.png" alt="enter image description here">Please find attached the table I am trying to generate . The output of the query returns data as specified in "Existing Table". I am trying to generate table as in Required Table. Don;t have any success so far.  As you can see in the figure , the column gets added for each State and City.</p>
  
  <p>Any idea how to accomplish this ?. I am using SQL Server 2008 R2.</p>
  
  <p>Appreciate the help .</p>