You are viewing a single comment's thread. Return to all comments →
SELECT CAST ( CEILING ( AVG (CAST ( SALARY AS FLOAT ) ) - AVG( CAST( REPLACE( CAST( SALARY AS VARCHAR(20) ),'0', '') AS FLOAT )) ) AS INT ) FROM EMPLOYEES;
This works...
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 →
SELECT CAST ( CEILING ( AVG (CAST ( SALARY AS FLOAT ) ) - AVG( CAST( REPLACE( CAST( SALARY AS VARCHAR(20) ),'0', '') AS FLOAT )) ) AS INT ) FROM EMPLOYEES;
This works...