this is what I have to do using SQL developer \"Display the employee number, nam
ID: 3885398 • Letter: T
Question
this is what I have to do using SQL developer
"Display the employee number, name, salary, and salary increased by 15% expressed as a whole number. Label the column New Salary."
this is how I did it:
SELECT empno, ename, sal, round(sal*0.15+sal) "New Salary" FROM emp;
this is what my query looks like:
now, I am asked to
"Modify your query from 3 to add an additional column that will substract the old salary from the new salary. Label the column increase. Rerun your query."
the question is how can I do that?, is there is any way I can use the data from the "New Salary" column?
how?
Explanation / Answer
select employee_id, last_name, salary, salary+(salary*15.5/100) "New Salary", (salary+(salary*15.5/100))-salary "Increses"
from employees;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.