-- ## 11: Active Tickets grouped by types ## -- -- -- List tickets, group by type, sorted by priority. SELECT t.type AS __group__, id AS ticket, summary, t.type AS type, time AS created, changetime AS _changetime, description AS _description FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE status <> 'closed' ORDER BY p.value, milestone, t.type, time