The Blunder

Sort by

recency

|

2132 Discussions

|

  • + 1 comment

    Looks like the test case is off? I consistently got 2252, but accroding to the checker the answer is supposed to be 2253.

  • + 0 comments

    SELECT CEIL( AVG(salary) - AVG(REPLACE(salary, '0', '')) ) FROM EMPLOYEES;

  • + 0 comments
    SELECT CEIL(AVG(SALARY) - AVG(REPLACE(SALARY, "0", "")))
    FROM EMPLOYEES
    
  • + 0 comments
    MYSQL:
    SELECT CEIL(
        AVG(salary) - AVG(CAST(REPLACE(CAST(salary AS CHAR), '0', '') AS SIGNED))
        )
    FROM employees;
    
  • + 0 comments

    MS SQL SERVER

    SELECT
    cast(
        Ceiling(
            
            avg(cast(salary as float))
            -
            avg( cast(replace(cast(salary as varchar(20)),'0','') as float) )
            
            )
         
    as int)
    FROM Employees