We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
There is a bug in your SQL Server code evaluator.
SELECT CEILING(AVG(SALARY - CAST(REPLACE(CAST(SALARY AS VARCHAR(10)), '0', '') AS float))) FROM EMPLOYEES
Your code evaluator returns 2253.0 rather than 2253, so it is marked as an incorrect answer.
The Blunder
You are viewing a single comment's thread. Return to all comments →
There is a bug in your SQL Server code evaluator. SELECT CEILING(AVG(SALARY - CAST(REPLACE(CAST(SALARY AS VARCHAR(10)), '0', '') AS float))) FROM EMPLOYEES
Your code evaluator returns 2253.0 rather than 2253, so it is marked as an incorrect answer.
However, according to Microsoft, https://msdn.microsoft.com/en-us/library/ms189818.aspx, CEILING returns the smallest integer greater than numeric expression.
Test the CEILING function in SSMS and you receive an integer every time.