title: how sql join works on 3 tables with example
body: <p>I am new to sql joins. can anyone explain me with a simple example how left/right/outer joins work with respect to joining 3 tables?</p>
  
  <p>say i have the following tables
  Area    </p>
  
  <pre><code>Area ID PersonID
  1        11
  2        12
  3        13
  </code></pre>
  
  <p>Disease </p>
  
  <pre><code>DiseaseID   Disease Name
  4            ABC
  5            DEF
  </code></pre>
  
  <p>Attack      </p>
  
  <pre><code>AttackID    Disease ID  AreaID
  111            4          1
  222            4          2
  222            5          1
  </code></pre>
  
  <p>I want to know the count of people who were attacked and who were not attacked by disease.</p>