title: Mysql Query to find free employees
body: <p>Help me to write mysql query to list only employees who are free ( employees currently without assigned task)</p>
  
  <p>task table sample data</p>
  
  <pre><code>   emp_id   task_start_date      task_compeletion_date  task_name
       872    2014-06-03 17:14:44  2014-06-04 17:14:46    task1
       873    2014-07-12 19:02:00  2014-07-13 00:25:00    task2
       872    2014-12-03 13:09:08  2014-12-30 12:54:15    task7
       874    2014-12-10 07:29:53  NULL                   task3
  </code></pre>
  
  <p>emp table sample data</p>
  
  <pre><code>   emp_id   first_name          last_name   
       872    John            David
       873    Suresh          Kumar
       874    Peter           Nail
       875    Zio             Xing        
  </code></pre>
  
  <p>I created this query </p>
  
  <pre><code>select * from emp where emp_id not in ( select emp_id from task) union   select emp.* from emp emp, task task where emp.emp_id = task.emp_id and (task.task_compeletion_date is not null or task.task_compeletion_date&lt;now())  ;
  </code></pre>
  
  <p>but it does not return the required list</p>