Last active
March 3, 2016 11:47
-
-
Save nomeyer/8f264ad6ff85ac480151 to your computer and use it in GitHub Desktop.
Combine queries using the union, intersection, or difference operators (from http://www.postgresql.org/docs/9.4/static/queries-union.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(select ... from ...) foo union (select ... from ...) bar; | |
(select ... from ...) foo intersect (select ... from ...) bar; | |
(select ... from ...) foo except (select ... from ...) bar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment