You are viewing a single comment's thread. Return to all comments →
SELECT CEILING(AVG(CAST(Salary as decimal)) - AVG(CAST(REPLACE(Salary, '0', '') as decimal))) FROM EMPLOYEES;
SELECT CEIL(AVG(salary) - AVG(REPLACE(salary, '0', ''))) FROM employees;
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 →
MS SQL Server
SELECT CEILING(AVG(CAST(Salary as decimal)) - AVG(CAST(REPLACE(Salary, '0', '') as decimal))) FROM EMPLOYEES;
MySQL
SELECT CEIL(AVG(salary) - AVG(REPLACE(salary, '0', ''))) FROM employees;