The Blunder

  • + 0 comments

    In SQL Server: Question is to round up to the "next integer". Hence, we used CEILING( ) function.

    SELECT CAST(CEILING(AVG(CAST(salary AS FLOAT)) - AVG(CAST(REPLACE(CAST(salary AS VARCHAR(21)), '0', '') AS FLOAT))) AS INT) FROM Employees;