title: SQL: How to do a left join and match each left value once only
body: <p>This type of problem has been perplexing me. </p>
  
  <p>I have 2 tables with money values, and I have to find matching values from another table. If the first table has a value (e.g. 10) three times and the second table has it 2 times, the result I want needs to show 2 values matched, and one is unmatched. It is kind of a many-to-many problem.</p>
  
  <p>I have outlined the problem in a Google Doc <a href="https://docs.google.com/document/d/198ZiSGhR6wC2FWNc5Bcr5DTDjx3jCycFq9qlj-eQsEo/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/document/d/198ZiSGhR6wC2FWNc5Bcr5DTDjx3jCycFq9qlj-eQsEo/edit?usp=sharing</a></p>
  
  <p>and implemented it in SQL Fiddle including with various failed attempts.
  <a href="http://sqlfiddle.com/#!17/80353/1" rel="nofollow noreferrer">http://sqlfiddle.com/#!17/80353/1</a></p>
  
  <p>I prefer Postgres, but a generic SQL solution would be fine.
  Can anybody help?</p>