Question: Hello need some assistance with the following Oracle SQL statements 7. Create a query that uses a natural join to join the departments table and

Hello need some assistance with the following Oracle SQL statements

7. Create a query that uses a natural join to join the departments table and the employees table by the department_number column. Display all columns.

8. Join Employees, departments, and projects tables with the JOIN USING syntax. Include the employee first and last name, department_name and project_number.

9. Write a statement joining the employees and projects tables. Display the first and last names, department number and manager id. Limit the query to those employees whose project number is P1011 or P1012.

10. Write a statement that displays the employee ID, first name, last name, manager ID, manager first name, and manager last name for every employee in the employees table. Hint: this is a self-join.

11. Query and display manager ID, department number, department name, first name, and last name for all employees in departments 1, 2, and 5.

12. Write a query that returns 3 columns: vendor_name from the vendors table, invoice_date from the invoices table, and balance_due which is invoice_total payment_total credit_total from the invoices table. The result set should have one row for each invoice with a non-zero balance. Sort the result set by vendor_name in descending order and by invoice_date in ascending order.

13. Use an outer join for this exercise. Write a query that returns two columns (account number and account description) from the General_Ledger_Accounts table. The result set should have one row for each account number that has never been used. Sort the final result set by account number in descending order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!