You are the database administrator and has been notified by top management of th
ID: 3883587 • Letter: Y
Question
You are the database administrator and has been notified by top management of the following scenarios. You are to make necessary changes to the records in date database. Write the queries to do these on your employees table. 1. Your organization has approved a raise of 10% for all employees, and another 10% for all employees hired on or before 4/12/2010. 2. There are however, 2 employees with SSNs 111227117 and 121336119 that excelled in their job and have been approved for an additional 12% raise. For this use the ssn in your employees table. 3. A lady recently got married and moved. Her address and last name have to be changed. Her new last name is Johnson and new address is 111 ford. Her ssn is 385127239. Change the emp_ID to match the provided one 4. You are required to generate a list of all employees born after March 25 1975 who live in the city of Farmington. You are to group by date of birth. 5. As list of employees showing how many years they have worked for the organization. 6. Find the average of salaries of the employees. 7. How many employees do you have? 8. List of employees from the city of Detroit born before 10/10/75Explanation / Answer
Query 1: update Employees set salary = (salary * 1.1) * 1.1 where date_of_hiring < '4/12'2010' or salary = salary * 1.1;;
Query 2: update Employees set salary = salary * 1.12 where SSN = 1112271117 and SSN = 121336119;
Query 3: update Employees set last_name = 'johnson', address = '111 Ford', where ssn = 38512772239 from Employees;
Query 4: select emp_name from Employees where dob > 'March 25 1975' and city = 'Farmington' group by dob;
Query 5: select Emp_name, trunc(months_between(sysdate,doj)/12) from Employees;
Query 6: select avg(salary) from Employees;
Query 7: select count(*) from Employee;
Query 8: select emp_name from Employee where city < 'Detroit' and dob
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.