[rt-users] Custom SQL

Winn Johnston winn_johnston at yahoo.com
Thu Sep 6 10:54:09 EDT 2012


All,

I am trying to create a top closers list on the default dashboard. I have the exact SQL statment i want to use, but i am lost after that.

select u.Name as User, count(1) as TotalClosedTix from Users u join Tickets t on u.id = t.owner where t.Status = "resolved" group by u.Name order by 2 desc limit 10 \G;

*************************** 1. row ***************************
          User: winnj
TotalClosedTix: 6
*************************** 2. row ***************************
          User: dennisc
TotalClosedTix: 3
*************************** 3. row ***************************
          User: royced
TotalClosedTix: 1
3 rows in set (0.00 sec)


Can someone please help?

Thanks
Winn Johnston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120906/e4464000/attachment.htm>


More information about the rt-users mailing list