Am 16.04.2014 02:36, schrieb Gerald Young:
...

select q.name <http://q.name> queue, count(t.id <http://t.id>) number from ticket t left join queue q on q.id <http://q.id>=t.queue_id left join ticket_state ts on ts.id <http://ts.id> = t.ticket_state_id group by q.name <http://q.name>

number of tickets locked and unlocked in each queue:

select q.name <http://q.name> queue, sum(if(t.ticket_lock_id =1, 1, 0)) unlocked, sum(if(t.ticket_lock_id = 2, 1, 0)) locked from ticket t left join queue q on q.id <http://q.id>=t.queue_id left join ticket_state ts on ts.id <http://ts.id> = t.ticket_state_id group by q.name <http://q.name>

(yeah, you're not going to find *that* one easily in a list).

Thank you Gerald for sharing!
(this is also ment for many other answers you gave in this List)

regards Fritz
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to