-
Nested Aggregate function help
Hello,
I'm trying to add a number of columns and then create a percentage as the result and place that result into a aliased column. I can't see where my error is but I'm getting a error that my nest is too deep. Can anyone help point out where I have gone wrong?
,round(SUM(SRTBEG + SRTEND + PRTBEG + PRTEND + (SUM(ICALLS - (SUM(SRTBEG + SRTEND + PRTBEG + PRTEND
+ NDDWRT + SETBEG + SIDERT + SCLERT + SDBERT + SDSERT + SBAERT + PETBEG + PIDERT + PCLERT + PDBERT
+ PDSERT + PBAERT + PTIDET + SREIMB + SNODET + PNODET + PTIDMT))))*100,2) || '%' Percentage) c7
-
SUM(A+ SUM(B) - SUM(C)) doesn't really make sense. Better to just write SUM(A+B-C) or SUM(A)+SUM(B)-SUM(C) -- the two are different because of the treatment of NULL values.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|