title: SQL WHERE (contains or equal)
body: <p>I want to take the first row (postgresql 9.2) :</p>
  
  <pre><code>SELECT posts.employee_id, posts.month, posts.year
    FROM posts
  WHERE  ((posts.month = 9 AND posts.year = 2013) 
          OR 
          (posts.month IS NULL AND posts.year IS NULL))
  ORDER BY posts.employee_id
  </code></pre>
  
  <p>But it returns: <br>
  <img src="https://i.stack.imgur.com/6v4Fe.png" alt="Execution of the query"> <br>
  <strong>The goal is to get result in just one row for each employee_id</strong>: <br></p>
  
  <p>IF month and year have found <br>
  THEN return the first record with the month and year <br>
  ELSE return the second record with month = NULL and YEAR = NULL <br>
  There's should be just one row (not two as on picture) <br>
  It will seems as a default fallback for non present records. <br></p>
  
  <p><a href="http://sqlfiddle.com/#!15/32227/1/0" rel="nofollow noreferrer">SQL FIDDLE</a></p>