Is the problem with SUM(billableDuration)? To find out, try commenting out that line and see if it works.
It could be that the sum is exceeding the maximum int. If so, try replacing it with SUM(CAST(billableDuration AS BIGINT)).
Is the problem with SUM(billableDuration)? To find out, try commenting out that line and see if it works.
It could be that the sum is exceeding the maximum int. If so, try replacing it with SUM(CAST(billableDuration AS BIGINT)).