Exercise #53 (tips and solutions) |
||
Here is a solution where an attempt at rounding is made.
The attempt is unsuccessful, since rounding as well as further casting to DECIMAL type (which is redundant in the given context, though) is carried out for a value which is already integer. In consequence, we manage to get not more than two zeroes after decimal point. The problem lies in the fact that AVG(numguns) is applied to an integer argument, therefore the result is cast to integer as well, fractional part being discarded rather than rounded, which is a peculiarity of To return to discussion of exercise #53 |