Written in Oracle apex (SQL) 1. Create a file called ps5a.sql script. Write a SQ
ID: 3585180 • Letter: W
Question
Written in Oracle apex (SQL)
1. Create a file called ps5a.sql script. Write a SQL query that displays the employee number, employee name, manager and job for all employees that have a manger with the ID number of 7839, 7566 or 7902. Use the IN operator to obtain your result set.
2. Create a file called ps5b.sql. Write a SQL query that displays the employee number, employee name job and salary for everyone not in the clerk or salesperson job description. Use the not in operator to filter the results in the result set.
3. Create a file called ps5c.sql. Write a SQL query that will return the empno, ename, job and salary for any employees whose name begins with ‘M’.
4. Create a file called ps5d.sql Create a SQL script will show the empno, ename, job, base salary and amount of salary after the raise amount of 20% is applied. The mathematical operation of the sal * 20%
Explanation / Answer
1. ps5a.sql
Select empno,ename,mgr,job from emp where mgr IN(7839,7566,7902);
2. ps5b.sql
Select empno,ename,job,sal from emp where job NOT IN('clerk','salesperson');
3.ps5c.sql
Select empno,ename,job,sal from emp where ename LIKE 'M%';
4. ps5d.sql
Select empno,ename,job,salary,sal * 0.2 as raisedSalary from emp;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.