title: Joining two tables and excluding rows already seen before
body: <p>I am trying to join two tables. Table x and y. 
  Table x </p>
  
  <pre><code>Product_x   ID       Date   Quantity
     A            1         7/1/2019    1100
     B            1         7/1/2019    200
  </code></pre>
  
  <p>Table y </p>
  
  <pre><code>Product_y   ID       Date   Used_Quantity
    A         1        7/1/2019      665
    B         1        7/1/2019      29
  </code></pre>
  
  <p>I am joining on Company ID, Date and Product B. This the output, I would get:</p>
  
  <pre><code>Product_x   Product_y   ID  Date        Quantity    Used_Quantity
  A              A            1   5/1/2019    1100    NULL
  B              A            1   5/1/2019    200 665
  B              B            1   5/1/2019    200 29
  </code></pre>
  
  <p>However, I want to exclude the middle row. I don't want the middle row because Product A from Table y has already occurred in Table x and therefore I don't want it's corresponding data from Table y. My desired would be:</p>
  
  <pre><code>Product_x   Product_y   ID  Date        Quantity    Used_Quantity
  A               B            1  5/1/2019    1100    NULL
  B               B            1  5/1/2019    200 29
  </code></pre>
  
  <p>Is there a way I can modify my existing query below.</p>
  
  <pre><code>Select * from x
  left join y on
  (x.ID = y.ID and x.Date=y.Date and x.Product_x = B)
  </code></pre>