
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?