title: SQL: Select where doesnt exist in other table
body: <p>I have the same name in each table however it is still selecting it from the ingredients table even though the exact name is in the ingredients_master table. Any ideas why?</p>
  
  <pre><code>SELECT
      `ingredients`.`id`,
      `ingredients`.`name` 
  FROM
      `ingredients` 
  WHERE
      `ingredients`.`name` LIKE '%makers%' ESCAPE '!' 
      OR `ingredients`.`name` LIKE '%jack%' ESCAPE '!' 
      OR `ingredients`.`name` LIKE '%hennesey%' ESCAPE '!' 
      OR `ingredients`.`name` LIKE '%bourbon%' ESCAPE '!' 
      OR `ingredients`.`name` LIKE '%RYE%' ESCAPE '!' 
      AND NOT EXISTS ( 
          SELECT * FROM ingredients_master WHERE ingredients.NAME = ingredients_master.NAME 
      ) 
  GROUP BY
      `ingredients`.`name`
  </code></pre>