Both methods worked and are much faster! The TO_BOOL function is a bit
quicker and I think a bit more concise of the two.
Using TO_BOOL it takes about 1.9 seconds to execute (compared to the ?
operator's 8 seconds). It only adds about 0.5 seconds to the overall query
which I think is more than acceptable.
Replaced:
ficoUPB = SUM( IS_NULL(l.Acquisition.BORROWER_CREDIT_SCORE) ? 0 : l.
Acquisition.ORIGINAL_UPB )
With either of these:
ficoUPB = SUM( TO_BOOL(l.Acquisition.BORROWER_CREDIT_SCORE) * l.
Acquisition.ORIGINAL_UPB)
ficoUPB = SUM( MIN([1, MAX([l.Acquisition.BORROWER_CREDIT_SCORE, 0])]) *
l.Acquisition.ORIGINAL_UPB )
Had to do a MIN and a MAX to get l.Acquisition.BORROWER_CREDIT_SCORE to be
either 0 or 1.
Thanks for the help!
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.