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.
- Prepare
- SQL
- Aggregation
- The Blunder
- Discussions
The Blunder
The Blunder
Sort by
recency
|
2186 Discussions
|
Please Login in order to post a comment
How can I remove digits from a record, I have not learned that concept yet... It comes under DDL ??
Everyone here is just so stupid. This tab was supposed to be for discussion. not for revealing solutions.
SELECT round(avg(salary)-round(avg(replace(salary,'0','')))) FROM employees;
easy solution
select ceil(avg(salary) - avg(replace(salary,'0',''))) from employees;SELECT CEILING(AVG(Salary)-CAST(AVG(REPLACE(CAST(Salary CHAR),'0',''))UNSIGNED )) FROM EMPLOYEES;