Created
August 20, 2018 12:46
-
-
Save LarsNieuwenhuizen/16660d15ea8b10e0b9bc0c8ba2e9cb9e to your computer and use it in GitHub Desktop.
Select double key combinations on table
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 CP1.* | |
FROM table CP1 | |
JOIN table CP2 | |
ON CP1.item1_id = CP2.item1_id AND CP1.item2_id = CP2.item2_id AND CP1.id > CP2.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment