Hi everybody,
I need some help with a spiceworks SQL report "Ticket Workload (30d)"
The reports gives me an error when saving: Invalid SQL - no such column: tickets.time_spent
on this link http://community.spiceworks.com/help/Potential_Reporting_SQL_Errorsthere is a suggestion to do the following:
tickets.time_spent
SELECT tickets.time_spent FROM tickets
SELECT COALESCE(SUM(ticket_work.time_spent), 0) as time_spent
FROM tickets LEFT OUTER JOIN ticket_work ON ticket_work.ticket_id = tickets.id
GROUP BY tickets.id
What should I change in the SQL code? any help would be appreciated.
This is the original code of the report:
select'IT-Maintenance or Projects'as"Category",
count(tickets.id)as"Tickets",
Cast(round(avg((julianday(tickets.closed_at)-julianday(tickets.created_at))),2)astext)as"Avg Days Open",
...