Arnold Ligtvoet wrote:
Hi,

I'm trying to work out a query that will output the agent activity for a
period. I've come up with this query:
SELECT DISTINCT ticket.id, ticket.tn, count(ticket.id) as
NO,system_user.first_name, system_user.last_name, ticket_state.name FROM
ticket
JOIN ticket_state ON ticket_state.id=ticket_state_id
JOIN system_user ON system_user.id=user_id
WHERE ticket.create_time LIKE '%2008-04%' AND ticket_state_id > 1 AND
ticket.change_by = ticket.user_id
GROUP BY user_id,ticket_state.name;

When I set it to create_time in the WHERE clause, the numbers look like
they are possible, however I'm seeing only tickets that were started in
the period that the query runs for and I'd like to see final ticket
states. I've tried changing create_time to change_time however this
gives me unusual high numbers of tickets.

Arnold.
BTW: is everybody getting reposts from the mailing list? I see my own
posts come back and back?
_______________________________________________
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
Support or consulting for your OTRS system?
=http://www.otrs.com/
  
Hi, Arnold!
What exactly do you mean by the "agent activity for period"?
--
MoiKrug - Циленко ЕгорЦиленко Егор