SQL and set theory are quite related, but in practical daily life, I think many developers (myself included) do not worry too much about theory. Maybe as a consequence thereof, it is typically more seldom that I see the set operators used than joins. Most often you get along with joins fine, but now and again, a well-chosen use of a set operator can be quite nice.
But maybe because we don’t use the set operators as much, I see too often code where the developer unwittingly fell into one of the pitfalls that exists, specifically concerning using distinct sets or sets with duplicates. ...