Skip to main content

Summing ticket charges - Databáza znalostí / Developer & Reporting / DPQL Examples - Deskpro Support

Summing ticket charges

Authors list

If you want to get the sum of all charges on a ticket, you can do this:

 

SELECT tickets.subject, DPQL_ALIAS(CONCAT(FLOOR(tickets.charges.charge_time / 3600), ' Hours ', FLOOR(MOD(SUM(tickets.charges.charge_time), 3600) / 60), ' mins'), 'Charge Time')

FROM tickets

GROUP BY tickets.id AS 'ID'

Pomocné Neužitočná

54 z 131 ľudí považuje túto stránku za užitočnú

Pridať komentár

Please log in or register to submit a comment.

Need a password reminder?