title: Weird empty set result on MYSQL query
body: <p>I am trying to write a query to find all PMA tasks linked to a non current pma. We follow single table inheritance for our different task types (entity_task table). All current pma ids are stored in the employee table. </p>
  
  <p>My first attempt was as follows :</p>
  
  <pre><code>SELECT * FROM entity_task 
  WHERE dtype = 'PMATask'
  AND pma_id NOT IN (SELECT pma_id FROM employee);
  </code></pre>
  
  <p>I expected this to return all tasks linked to a non current PMA but it just returns an empty set.</p>
  
  <p>The entity task table structure is as folows</p>
  
  <pre><code>+---------------------------+-------------+------+-----+--------------------+----------------+
  | Field                     | Type        | Null | Key | Default            | Extra          |
  +---------------------------+-------------+------+-----+--------------------+----------------+
  | id                        | bigint(20)  | NO   | PRI | NULL               | auto_increment |
  | date_created              | datetime    | NO   |     | NULL               |                |
  | version                   | int(11)     | NO   |     | NULL               |                |
  | employee_course_id        | bigint(20)  | YES  | MUL | NULL               |                |
  | task_id                   | bigint(20)  | NO   | MUL | NULL               |                |
  | tenant_id                 | bigint(20)  | YES  | MUL | NULL               |                |
  | date_updated              | datetime    | YES  |     | NULL               |                |
  | dtype                     | varchar(31) | NO   |     | EmployeeCourseTask |                |
  | meeting_id                | bigint(20)  | YES  | MUL | NULL               |                |
  | pma_id                    | bigint(20)  | YES  | MUL | NULL               |                |
  | critical_talent_review_id | bigint(20)  | YES  | MUL | NULL               |                |
  | working_week_id           | bigint(20)  | YES  | MUL | NULL               |                |
  | leave_form_id             | bigint(20)  | YES  | MUL | NULL               |                |
  | leave_adjustment_id       | bigint(20)  | YES  | MUL | NULL               |                |
  | remuneration_run_id       | bigint(20)  | YES  | MUL | NULL               |                |
  +---------------------------+-------------+------+-----+--------------------+----------------+
  </code></pre>
  
  <p>We finally managed to get all tasks linked to non current PMA's by using the following query</p>
  
  <pre><code>SELECT et.id 
  FROM entity_task et 
  LEFT JOIN employee e ON et.pma_id = e.pma_id 
  WHERE e.pma_id IS NULL 
  AND et.dtype = 'PMATask';
  </code></pre>
  
  <p>I really feel like I am missing something here, any advice ??</p>