-- ## 17: Tickets by length of CC list ## -- -- This report shows all non-closed tickets, sorted by number of CCs. SELECT p.value AS __color__, id AS ticket, LENGTH(cc) AS _cclen, cc, summary, component, version, milestone, owner, status, priority, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t, enum p WHERE t.status <> 'closed' AND p.name = t.priority AND p.type = 'priority' AND _cclen > 0 ORDER BY _cclen DESC, (status = 'assigned') DESC, p.value, milestone, t.type, time