We currently have the following SQL report setup to show us the total amount of hours spent on support tickets, per client (which is categorised by a company filed) which is displayed in minutes. The reason we show it in minutes is because we do not know how to show hours with a decimal point to show .25, .50, .75 for example.
Does anyone know how we can run a SQL report that will show the result in hours including a decimal point?
SELECT c_company AS 'Company',
SUM (tw.time_spent)/60
AS "Time Worked in Minutes"
FROM tickets t LEFT OUTER JOIN ticket_work tw ON tw.ticket_id = t.id
--the next line should pull anything from the beginning of the month onward
WHERE tw.created_at >= DATE('now','start of month')
--the next line should limit the date range to stop at the end of the current month
AND tw.created_at <= DATE('now','start of month', '+1 month')
GROUP BY Company