[Rt-users] Help with Reports

Carl Makin carl at xena.IPAustralia.gov.au
Thu Apr 15 21:44:10 EDT 2004

Hi Phillip,

On Thu, 2004-04-15 at 23:00, phillip wrote:
> Thanks that solves half of my problem so how do I get the requstor name into 
> the report and  and get all the tickets for the whole month?

Perhaps something like this?

SELECT COUNT(Tickets.id) as resolvecount, Users.RealName,
sum(Tickets.TimeWorked) FROM Transactions, Users, Tickets WHERE
Tickets.id=Transactions.Ticket AND Users.id = Transactions.Creator AND
Transactions.Created >= '2004-03-01' and Transactions.Created <=
'2004-03-31' Transactions.NewValue='resolved' GROUP BY Users.Realname
ORDER BY resolvecount DESC;

That should generate a list of all users who have resolved tickets
during the month of March in descending order of how many tickets they
resolved and include their name and the sum of how many minutes they put
in the timeworked field.

This is basically a report from my Batch Stats reports available via the
wiki at;

As far as I can tell, if time is added to an individual transaction,
then it is automatically summed into the ticket row. If someone knows
this is wrong then please email me.


More information about the rt-users mailing list