Hi,
I have structure where all the tickets are grouped by assignee: I want to check when the resource is free
WITH maxDueDate = MAX(dueDate)
WITH currentDate = NOW()
WITH daysDifference = ROUND((currentDate - maxDueDate) / (1000 * 60 * 60 * 24))
WITH availabilityStatus =
IF (currentDate > maxDueDate) :
"Free since " + daysDifference + " days"
ELSE IF (currentDate == maxDueDate + 1 day) :
"Free today"
ELSE :
"Free in " + (maxDueDate - currentDate) / (1000 * 60 * 60 * 24) + " days"Thank in advance