もっと短い方法はありますか...??
SELECT clid, cldoel, clanker, clprefix, clleerlijn, f1, f2, f3, f4 FROM Clusters
WHERE clleerlijn like 'WJNLLUI%' AND (f3 IS NOT NULL OR f4 IS NOT NULL )
AND clid in(
Select agClid FROM agenda2 as a JOIN evaluaties2 as e ON a.agclid = e.evalclid and agLkrid = evallkrid
WHERE (agSchoolid='18' and agDatum >= '2013/01/01' and agDatum <= '2013/02/12')
GROUP BY agClid
except
(SELECT agClid
FROM agenda2 as a
JOIN evaluaties2 as e
ON a.agclid = e.evalclid and agLkrid = evallkrid
WHERE agSchoolid='18'
and agLkrid in (1,2932,2935)
and agDatum >= '2013/01/01'
and agDatum <= '2013/02/12'
AND evalWaarde = 3
GROUP BY agclid
HAVING COUNT(DISTINCT agLkrid) = 3)
)