It is well known that SQL’s syntax sometimes forces users to write queries in an awkward way. Together with the danger of formulating an incorrect query, complex queries pose a challenge to the optimizer. A well studied example is that of universal quantification [1,2]. As an example, assume two relations: student(sid) and teaches(pid,sid), which denotes that professor pid is a teacher of student sid. Consider the question “find the professors teaching all students.” Since SQL does not directly support the quantifier all, most textbooks express this question using two subqueries, NOT EXISTS and NOT IN.