Skip to main content

Percentage of tasks completed within their due date by agent - DPQL Reports - Deskpro Support

We can run the report below to find the percentage of tasks that we are completing before thir due date:

SELECT DPQL_ALIAS(DPQL_PERCENT(UNIX_TIMESTAMP(tasks.date_completed) < UNIX_TIMESTAMP(tasks.date_due)), 'Percentage of tasks completed in time')
FROM tasks
WHERE tasks.is_completed = 1
GROUP BY tasks.person.name

Here we use the UNIX_TIMESTAMP* which allows us to apply a numerical value to a date-time.

The number simply counts up so the further into the future the higher the number.

In this instance we're simply finding whether tasks.date_completed is less than tasks.date_due. 

We're then fomatting this using DPQL_PERCENT.


* You can read more about UNIX Timestamp below:

https://www.unixtimestamp.com/ 

اضافه کردن نظر

Please log in or register to submit a comment.

Need a password reminder?