title: SQL COUNT among multiple columns
body: <p>I want to know what is the SQL if I want data to count from the occurence of a number with respect to data in another table.</p>
  
  <p>TABLE1</p>
  
  <pre><code>Day1         Day2
  --------------------
  1            2
  2            3
  1            3
  3            1
  </code></pre>
  
  <p>TABLE2</p>
  
  <pre><code>ID       NAME
  ------------------
  1        John
  2        Mary
  3        Tom
  </code></pre>
  
  <p>The result I want from SQL will be this</p>
  
  <pre><code>ID       NAME        OCCUR
  1        John        3
  2        Mary        2
  3        Tom         3
  </code></pre>
  
  <p>How will the SQL look like for getting this result?</p>