title: left join with condition in MySQL
body: <p>I do have 2 tables students and attendance.</p>
  
  <p>Students</p>
  
  <pre><code>student_id   name
  ----------  -----
  1          | A
  2          | B
  3          | C
  </code></pre>
  
  <p>Attendance</p>
  
  <pre><code>id | date       | student_id
  ------------------------------
  1  | 2015-12-05 | 1
  2  | 2015-12-05 | 2
  3  | 2015-12-05 | 3
  4  | 2015-12-06 | 2
  5  | 2015-12-06 | 3
  </code></pre>
  
  <p>I need the details of students who are absent on  2015-12-06. </p>
  
  <p>The result should be : 1 | A</p>
  
  <p>I know the query I am trying is wrong but it should be something like :</p>
  
  <pre><code>SELECT * 
  FROM students s 
  left join attendance a on s.id=a.student_id 
  where date='2015-12-06' and a.id IS NULL
  </code></pre>
  
  <p>Please suggest me.</p>