You are viewing a single comment's thread. Return to all comments →
select ceil(avg(salary) - avg(replace(salary,'0',''))) from employees
here if we use round it will round the number to nearest whole number, that's why we use ceil. so it will round the element to nearest integer.
Seems like cookies are disabled on this browser, please enable them to open this website
The Blunder
You are viewing a single comment's thread. Return to all comments →
select ceil(avg(salary) - avg(replace(salary,'0',''))) from employees
here if we use round it will round the number to nearest whole number, that's why we use ceil. so it will round the element to nearest integer.