Created
December 18, 2012 14:35
-
-
Save bemasher/4328506 to your computer and use it in GitHub Desktop.
Query for collecting id's of sequential character pairs matching a particular tuple of characters.
This file contains hidden or 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
| INSERT INTO Merge SELECT | |
| a.SemanticID, | |
| MIN(b.SemanticID) | |
| FROM SubtitleSemantic a | |
| JOIN SubtitleSemantic b ON | |
| a.SemanticID < b.SemanticID | |
| AND a.SubtitleID = b.SubtitleID | |
| AND a.Line = b.Line | |
| AND b.CharID = :second | |
| WHERE a.CharID = :first | |
| GROUP BY a.SemanticID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment