You are viewing a single comment's thread. Return to all comments →
what am I doing wrong here for SQL server?
SELECT floor(AVG(salary) - AVG(REPLACE(cast(salary as varchar), "0", ""))) FROM employees;
giving me wrong answer
Seems like cookies are disabled on this browser, please enable them to open this website
The Blunder
You are viewing a single comment's thread. Return to all comments →
what am I doing wrong here for SQL server?
SELECT floor(AVG(salary) - AVG(REPLACE(cast(salary as varchar), "0", ""))) FROM employees;
giving me wrong answer