I have an experiment DB, and try to get all the participants that wish to be recontacted except for the ones that participated in one specific experiment. The query works, except that it only doesn't include the participants that took part only in this experiment, but does include participants that took part in that experiment and other experiments. Excuse my sloppy code!
SELECT DISTINCT t1.`par_name`, t1.`email`, t1.`comment`
FROM `par` AS t1, `exp` AS t2, `pie` AS t3
WHERE t1.`par_id` = t3.`par_id` AND t3.`exp_id` = t2.`exp_id` AND
t1.`ReContact`!= 'N' AND t1.`email`!= " " AND t1.`MotherTounge`
= 'Deu' OR t1.`MotherTounge` = '' AND t1.`age` BETWEEN 18 AND 35
AND t1.`par_name` NOT IN(SELECT t1.`par_name`
FROM `par` AS t1, `exp` AS t2, `pie` AS t3
WHERE t1.`par_id` = t3.`par_id` AND
t3.`exp_id` = t2.`exp_id` AND t3.`exp_id` = '15ET001')
GROUP BY `par_name`;