The Blunder

Sort by

recency

|

1878 Discussions

|

  • + 0 comments

    SELECT CEIL(ABS( (SELECT AVG(salary) FROM EMPLOYEES) - (SELECT AVG(CAST(REPLACE(CAST(salary AS CHAR), '0', '') AS UNSIGNED)) FROM EMPLOYEES) )) AS error_difference;

    -- For MySQL

  • + 0 comments

    SELECT CAST(CEILING(AVG(CAST(SALARY AS FLOAT)) - AVG(CAST(REPLACE(SALARY, '0', '') AS FLOAT))) AS INT) FROM EMPLOYEES;

  • + 0 comments

    select round(avg(Salary))-round(avg(replace(Salary,'0',''))) from EMPLOYEES;

  • + 0 comments

    SELECT CEIL(AVG(SALARY)-AVG(REPLACE(SALARY,0,''))) AS DIFFERENCE FROM EMPLOYEES;

  • + 0 comments

    Select ROUND(AVG(SALARY))-ROUND(AVG(REPLACE(SALARY,'0',''))) FROM EMPLOYEES