Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Unit 4 Assignment 2 Directions Perform the following tasks below by using the co

ID: 3528821 • Letter: U

Question

Unit 4 Assignment 2 Directions 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. Use the new Join syntax.

1. Find the columns that make up the primary key of the l_lunch_items table. Sort the columns by position. (Do this in one statement).

SELECT lunch_id FROM l_lunch_items ORDER BY 1 ASC;

2. List all the lunches that employees have signed up for. Show me first_name, last_name, lunch_date, and product_code of the items they ordered. Do not include employees who don't have a manager. Sort the rows by product_code. (NOT SURE WHAT IS WRONG is says NO DATA FOUND)

Select first_name, last_name, lunch_date,product_code From l_employees e,l_lunches l ,l_lunch_items li where e.employee_id=l.employee_id and l.lunch_id=li.lunch_id and e.manager_id<>null order by product_code; (NOT SURE WHAT IS WRONG is says NO DATA FOUND)

3. From the employees table, list the employee_id, last_name, and phone_number of every employee, along with the last_name and phone number of his manager. Sort the rows by employee_id. (Hint

Explanation / Answer

please dont ask so many qestions in a single post sorry

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote