Could you please help me to define PQL formula for the below use case?
Average time(
When count(WI of a DOCID)>2 then 0
When count(WI of a DOCID)=2 then END_DATE - START-DATE of highest WI
ELSE END_DATE - START-DATE
)
Page 1 / 1
You cannot have AVG and then an aggregate function like COUNT. This will be something very complicated to achieve in the frontend (PQL), my suggestion would be do this calculation in the backend and not in PQL
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.