Question
Subject: Oracle DBA Problem A SQL SELECT Given a table definition: Employees( employee_id, first_name, last_name, salary, manager_id, hire_date, commission_pct, department_id) write the following SQL statements.
Subject: Oracle DBA
Problem A SQL SELECT Given a table definition: Employees( employee_id, first_name, last_name, salary, manager_id, hire_date, commission_pct, department_id) write the following SQL statements.
A.1 Write a query that displays the first eight characters of the employees last names and indicates the amounts of their salaries with asterisks. Each asterisk signifies a thousand dollars. Sort the data in descending order of salary.
A.2 Write a query to display the manager number and the salary of the lowestpaid employee for that manager. Exclude anyone whose manager is not known. Exclude any groups where the minimum salary is $6,000 or less. Sort the output in descending order of salary.
A.3 Write a query to display employees last names and employee number along with their managers last names and manager number.
A.4 The HR department wants to determine the names of all employees who were hired after Davies. Create a query to display the name and hire date of any employee hired after employee Davies.
A.5 Display the employee number, last name, and salary of all employees who earn more than the average salary and who work in a department with any employee whose last name contains a w.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started