Created
April 23, 2015 03:06
-
-
Save doryokujin/cc2d87d3289cdc532142 to your computer and use it in GitHub Desktop.
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 n1.id, n2.id, n1.id || ' ♥ ' || n2.id | |
FROM | |
( | |
SELECT id, gender | |
FROM men_and_women | |
) n1, | |
( | |
SELECT id, gender | |
FROM men_and_women | |
) n2 | |
WHERE n1.id < n2.id | |
ORDER BY n1.id, n2.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment