Thanks for the question, Athi.
Asked: January 18, 2023 - 5:52 pm UTC
Last updated: January 19, 2023 - 12:30 am UTC
Viewed 100+ times
Assume that the company you work in wants to increase the salaries by 20% this year, and also wants to add 1000 as bonus to each salary after 20% increase. Based on this information, write a SQL query that returns the new salaries from the EMPLOYEES table.
Your query should return the employee_id, salary and new_salary columns. (new_salary should be the alias for the calculated salary)
and Connor said...
Sounds like homework :-)
So if the column is SALARY, then adding 20% is the same as multiplying by 1.2
Thus new salary will be SALARY*1.2 + 1000
That should you get you going.