I am having the problem with MySQL ROUND() Function.
Here it is:
When I do this:
SELECT ROUND(7/2) as avg FROM bla blah
avg is 4
When I do this:
SELECT ROUND(SUM(marks)/COUNT(marks)) as avg
avg is 3
Note: SUM(marks) on its own gives 7 and COUNT(marks) gives 2 which as far as I understand
ROUND(SUM(marks)/COUNT(marks)) should be equal to ROUND(7/2)
What is the problem?
You might use
CEILING(same asROUNDexcept it always rounds to the bigger nearest integer)should yield the result you want for the requirements specified in the question.