Tag Archives: Spiceworks

Spiceworks Report – Tickets Closed Last Month by Technician

This report includes tickets that were assigned to nobody, and also gives a grand total. It does not include technicians who did not close any tickets the previous month unfortunately. There is no need to edit the report; it automatically gets the statistics for the month prior to the running of the report.

select Name, Count from (

select u.first_name || " " || u.last_name as 'Name', count(*) as 'Count'
  from tickets t, users u
  where t.closed_at between date('now','start of month','-1 month') and date('now','start of month')
  and t.status = "closed"
  and t.assigned_to = u.id
  group by Name
  
union
  
select "(Nobody)" as Name, count(*) as 'Count'
  from tickets t
  where t.closed_at between date('now','start of month','-1 month') and date('now','start of month')
  and t.status = "closed"
  and t.assigned_to is NULL
  
union
  
select "z_GRAND TOTAL" as Name, count(*) as 'Count'
  from tickets t
  where t.closed_at between date('now','start of month','-1 month') and date('now','start of month')
  and t.status = "closed"
  
)
  
group by Name
order by [Name] ASC
Advertisements