Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please give me a suggestion that which is the correct way to use sum function:
sum(sales/10000)
or
sum(sales)/10000
and I have noticed that value is changed for some data.
Please suggest with an example.
Thanks,
Sandip
Its largely a matter of style. The second one is marginally more efficient and may execute slightly faster and this will be more important if the data set is large. So I would generally move the constant out of the sum().
the second one
Andy
Hi Sandeep,
As we are using sum here, both shouldn't make any difference. And choosing the correct way depends on the requirement.
Its largely a matter of style. The second one is marginally more efficient and may execute slightly faster and this will be more important if the data set is large. So I would generally move the constant out of the sum().