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.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. SQL
  3. Aggregation
  4. The Blunder
  5. Discussions

The Blunder

Problem
Submissions
Leaderboard
Discussions

Sort 1368 Discussions, By:

recency

Please Login in order to post a comment

  • youness_ahasla
    1 day ago+ 0 comments

    SQL :

    SELECT CEIL(AVG(salary) - AVG(REPLACE(salary, '0', ''))) FROM EMPLOYEES;
    
    1|
    Permalink
  • namnmfx22541
    4 days ago+ 0 comments
    SELECT CEIL(AVG(Salary) 
    											- AVG(
    											REPLACE(Salary, '0', '')
    											))
    FROM EMPLOYEES;
    
    0|
    Permalink
  • namnmfx22541
    4 days ago+ 0 comments
    SELECT CEIL(AVG(Salary) - AVG(REPLACE(Salary, '0', '')))
    FROM EMPLOYEES;
    
    1|
    Permalink
  • mariana_soares
    4 days ago+ 3 comments

    If anyone could do this in MS SQL SERVER, please, leave here the answer, 'cause i couldn't. Always appears a VARCHAR error and I've tried all ways possible.

    0|
    Permalink
  • tejasgawade7744
    4 days ago+ 0 comments

    select CEILING((select avg(salary) from EMPLOYEES)-(select avg(REPLACE(salary, '0', '')) from EMPLOYEES)) EMPLOYEES;

    0|
    Permalink
Load more conversations

Need Help?


View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy