title: Common Record from 2 tables in SQL Server
body: <p>I have 2 tables. Both the tables contain 2 columns: <code>id</code>, <code>amt</code>.
  Table 1 has these data:</p>
  
  <pre><code>id, amt
  1,  500;
  2,  2000;
  4,  1000.
  </code></pre>
  
  <p>Table 2 contains:</p>
  
  <pre><code>id, amt
  1,  100;
  1,  100;
  1,  100;
  1,  100;
  1,  100;
  2,  250;
  3,  300;
  4,  1000;
  </code></pre>
  
  <p>Now my requirement is getting the record which is common id and common amt in both the table. But the challenge here is, id 1 is available in both the table. But the sum(amt) in table 2 with id 1 = amt in table 1 with id 1. I need to pull this record also as a common record. Please help me in this. Thanks.</p>