I’ll begin this chapter by describing "all customers for whom every employee from the USA has handled at least one order" not in SQL, as you will see in Chapter 6, but in the mathematical language of set theory. Turning English into mathematics, by the way, is much harder than doing mathematics or speaking English, and this example will highlight some of the mathematical ideas that are particularly useful to SQL programmers. Some of the set theory notation in this section will be defined later. Don’t worry if it’s unfamiliar.

First of all, let’s give the result set we’re after a name.

Start Free Trial

No credit card required