title: SQL Server Adding one row to another but only for one column
body: <p>Probably best understood by the picture below.</p>
  
  <p><a href="https://i.stack.imgur.com/RLRTv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RLRTv.png" alt="I have the table on the left but want the table on the right"></a>. I want to add together any items that share a reference number <strong>without</strong> adding up the table number column. My SQL is of the form</p>
  
  <pre><code>SELECT
  
  [Order Reference]
  ,[Item Price]
  ,[Table Number]
  
  From Orders
  </code></pre>
  
  <p>I'm pretty sure I need to SELECT from a second SELECT that sums the items prices but I can't get the exact syntax for summing over the order reference without summing the table numbers also. </p>
  
  <p>Edit : </p>
  
  <p>I think I left out important info for the first answerers. And I clearly messed up the sample data. Many apologies. The table has other columns that I haven't included in my query so when I try a group by I still get multiple rows. I want to isolate the particular column and merge the rows disregarding any column that is different (I don't mind which data of the other columns is chosen) </p>
  
  <p>So for clarity (hopefully) the table also has 20 other columns like discount yes or no which I basically want to ignore but which seem to prevent the rows from merging together from a simple group by clause.  </p>
  
  <p><a href="https://i.stack.imgur.com/V8YOZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V8YOZ.png" alt="enter image description here"></a></p>