Neidio i'r brif gynnwys

DPQL_PERCENT

yn List of Functions
Rhestr o awduron
Cyhoeddwyd: Jul 18, 2019|Diweddarwyd diwethaf: Nov 3, 2022

DPQL_PERCENT allows us to check the percentage of a group that meets a specified condition.

ExampleCopy link to Example to clipboard

We'd like to check the Percentage of tickets that have been submitted to our helpdesk that have been resolved.

To do this we simply run the query below

SELECT DPQL_PERCENT(tickets.status IN ('resolved', 'archived')) AS 'Percentage of tickets resolved' FROM tickets
copy

The query finds the total number of statuses in 'tickets' and then calculates the percentage of these that match the condition specified 'tickets.status IN ('resolved', 'archived')'

image.png

In this instance 29.11 %.

DefnyddiolAnnefnyddiol
tudalen nesafIN
tudalen flaenorolAVG

Mewngofnodwch neu cofrestrwch i gyflwyno sylw.