Increase Salaries with JOIN
Здравейте,
Защо решението на задачата :
Increase Salaries
Write a SQL query to increase salaries of all employees that are in the Engineering, Tool Design, Marketing or Information Services department by 12%. Then select Salaries column from the Employees table.
се приема за верен от Judge следния код:
UPDATE employees
SET salary=salary+salary*0.12
WHERE department_id IN (1,2,4,11);
SELECT salary FROM employees;
А с този дава 100% грешен резултат:
UPDATE employees
SET salary=salary+salary*0.12;
SELECT e.salary AS Salary
FROM employees AS e
JOIN departments AS d
ON e.department_id= d.department_id
WHERE d.name='Engineering' OR d.name='Tool Design' OR d.name='Marketing' OR d.name='Information Services'
group by e.salary;
Колега питах за същата задача и още няколко задачи от това упражнение.
https://gyazo.com/c7fb6cde865bb49610ae74b97051be43
Благодаря за разяснението :)
Software university is an amazing university. This is one of the best institutes of the state. This institute has been serving the nation for so long. If you will check appointment setting job description and get good skills to make a leaderships. This blog is about increasing salaries. Thanks for sharing this with us.