Created
August 8, 2014 12:33
-
-
Save gaetanm/06899e70b8f96efcb6a5 to your computer and use it in GitHub Desktop.
The worst query atm
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 item.item0 FROM | |
(SELECT item0 FROM situationalItems WHERE type = 1 | |
AND build IN (SELECT id FROM build WHERE champion = ? AND mode = ? AND role = ? AND position = ?) UNION ALL | |
SELECT item1 FROM situationalItems WHERE type = 1 | |
AND build IN (SELECT id FROM build WHERE champion = ? AND mode = ? AND role = ? AND position = ?) UNION ALL | |
SELECT item2 FROM situationalItems WHERE type = 1 | |
AND build IN (SELECT id FROM build WHERE champion = ? AND mode = ? AND role = ? AND position = ?)) | |
AS item GROUP BY item.item0 ORDER BY COUNT(*) DESC LIMIT 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Holy shit !