-- ## 15: Active Tickets by Component ## -- -- -- * List all active tickets by modification date and component. -- * Color each row based on priority. -- * You can sort the list by each column, clicking on the header (clicking a second time: reverse order) SELECT component, p.value AS __color__, id AS ticket, summary, version, t.type AS type, owner, status, time AS created, changetime AS modified, description AS _description, milestone, reporter AS reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE status <> 'closed' ORDER BY component, status, (-1)*changetime, CAST(p.value AS int), milestone, t.type, time