Created
December 29, 2010 20:56
-
-
Save Pross/759065 to your computer and use it in GitHub Desktop.
original
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
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 p.value AS __color__, | |
owner AS __group__, | |
id AS ticket, summary, t.type AS type, time AS created, | |
changetime AS _changetime, description AS _description, | |
reporter AS reporter, keywords AS _keywords | |
FROM ticket t | |
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' | |
WHERE status <> 'closed' AND keywords not like '%buddypress' AND EXISTS( | |
SELECT * | |
FROM ticket t | |
WHERE id < ticket AND keywords LIKE _keywords | |
AND resolution = 'approved' | |
order by id DESC LIMIT 1 | |
) | |
ORDER BY owner, CAST(p.value AS int), t.type, time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment