Ask PL-SQL Expert

Perform the following tasks below by using the correct SQL statements. Create the statements in Oracle by using the following steps (SQL > SQL commands > Enter Command). Once your command is error-free, copy and paste your statements into this assignment document. Upload this Word document for grading.
All questions should be answered with one SQL statement

1. Change the department number of all employees with employee 7900's job title to employee 7900's current department number. (use the emp table)

2. Generate a listing showing the ename, salary, and department number for all employees that have the same title as the employee Adams. (Use the emp table).
Select ename, sal, deptno
From emp

3. Create a new table spec_emp that includes the ename, job, mgr, hiredate, sal, and comm columns from the emp table. Include only those employees that have the same hiredate as James. 

4. Insert into the spec_emp table all the employees that work in the same department as Jones. (Use the emp table )

5. Delete the information from the spec_emp table for all employees who have the same job as Smith. (Use the emp table )

6. Display the employee number and name for each employee who job is not the same as that of any employee named Smith or Scott. (Use the emp table)

7. Find the suppliers whose average price of food is greater than that average price of food. (Use the l_foods table).

8. Find all the employees who have a higher credit limit than the average credit limit of their particular department. Show employee_id, first_name, last_name, credit_limit, and dept_code in your results. (l_employees table)

9. Find all employees who make less than the average salary. Show emp, ename, sal in your results. (emp table)

10. Find all the employees who have the highest salary per department. Show empno,ename,deptno,sal in your results. (emp table )

11. Using the l_employees table, create a query that shows the management hierarchy. Structure the query so that it will always start with the employee who does not have a manager. Show employee_id, first_name, last_name in your results. Pad the results so that each successive level is indented.

12. List all the employees who have not signed up for any lunches.

13. List all the employees who have signed up for at least one lunch.

14. List all the suppliers who did not supply any food to the lunches.

15. List all the names from the l_employees and emp table. (Just the names only). Concatenate the first_name and last_name from the l_employees table to get one name.

PL-SQL, Programming

  • Category:- PL-SQL
  • Reference No.:- M9641109

Have any Question?


Related Questions in PL-SQL

Complete the following tasksin microsoft access create the

Complete the following tasks: In Microsoft Access, create the database and tables that you identified in W3 Assignment 2. In Microsoft Word, write the SQL statements to create the database and tables. Write SQL statement ...

Purpose of the assessment with ulo mapping the purpose of

Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop skills in managing data in databases and to gain understanding of data model development and implementation using a commercially a ...

Continuing the project you have worked on in weeks 1-4 in

Continuing the project you have worked on in Weeks 1-4, in this final week, complete the following tasks: Refine your database and SQL statements by incorporating your instructor's feedback. Verify that the database comp ...

For this assignment you will be provided a database backup

For this assignment, you will be provided a database backup for a database called FinanceDB. You will have to restore this backup to your own version of SQL Server. All of the questions in this assignment relate to the F ...

Assignment - queries functions and triggersaimthe aims of

Assignment - Queries, Functions and Triggers Aim The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL queries; create SQ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As