SELECT
   newExp.*
FROM newExp
LEFT JOIN newImfile
   USING(exp_tag)
LEFT JOIN rawExp
   USING(exp_tag)
WHERE
    newExp.exp_tag IS NOT NULL
    AND newImfile.exp_tag IS NULL
    AND rawExp.exp_tag IS NULL
    AND newExp.imfiles =
    (SELECT COUNT(exp_tag) FROM rawImfile
        WHERE rawImfile.exp_tag = newExp.exp_tag)
    AND newExp.exp_tag = '%s'
