Please write a view  to list staff’s names, salary, ages, and their supervisors’ names, salary, and ages for all staff whose supervisor’s age is younger than the staff’s age and their supervisor’s salary is higher than the staff’s salary. You should use Staff2 table. The output header needs to distinguish between staff and manger: (E_name, E_salary, E_age, M_name, M_salary, M_age)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please write a view  to list staff’s names, salary, ages, and their supervisors’
names, salary, and ages for all staff whose supervisor’s age is younger than the staff’s age and their
supervisor’s salary is higher than the staff’s salary. You should use Staff2 table. The output header
needs to distinguish between staff and manger: (E_name, E_salary, E_age, M_name, M_salary, M_age)

### Employee Data Table

The table below presents detailed information on various employees, including their identifiers, personal details, job roles, and salaries.

| staffNo | fName  | lName | position   | sex | DOB        | salary  | branchNo | superno |
|---------|--------|-------|------------|-----|------------|---------|----------|---------|
| ABC1    | New    | Eng   | Intern     | M   | 2000-01-01 |  9000.00 | B002     | SL21    |
| CC1     | Super  | User  | DBA        | M   | 1995-01-01 | 90000.00 | B005     | SG14    |
| SA9     | Mary   | Howe  | Assistant  | F   | 1970-02-19 |  9000.00 | B007     | SG5     |
| SG14    | David  | Ford  | Supervisor | M   | 1958-03-24 | 18000.00 | B003     | SG5     |
| SG37    | Ann    | Beech | Assistant  | F   | 1960-11-10 | 12000.00 | B003     | SG5     |
| SG5     | Susan  | Brand | Manager    | F   | 1940-06-03 | 24000.00 | B003     | SL21    |
| SL21    | John   | White | Manager    | M   | 1945-10-01 | 30000.00 | B005     | NULL    |
| SL41    | Julie  | Lee   | Assistant  | F   | 1965-06-13 |  9000.00 | B005     | SL21    |
| XY1     | New    | Tester| Assistant  | M   | 1990-01-01 |  8000.00 | B002     | SL21    |

**Columns Explanation:**

- **staffNo**: Unique identifier for each staff member.
- **fName**: First name of the employee.
- **lName**: Last name of the employee.
- **position**: Job role of the employee.
- **sex**: Gender of the employee (M for Male, F for Female).
- **DOB**
Transcribed Image Text:### Employee Data Table The table below presents detailed information on various employees, including their identifiers, personal details, job roles, and salaries. | staffNo | fName | lName | position | sex | DOB | salary | branchNo | superno | |---------|--------|-------|------------|-----|------------|---------|----------|---------| | ABC1 | New | Eng | Intern | M | 2000-01-01 | 9000.00 | B002 | SL21 | | CC1 | Super | User | DBA | M | 1995-01-01 | 90000.00 | B005 | SG14 | | SA9 | Mary | Howe | Assistant | F | 1970-02-19 | 9000.00 | B007 | SG5 | | SG14 | David | Ford | Supervisor | M | 1958-03-24 | 18000.00 | B003 | SG5 | | SG37 | Ann | Beech | Assistant | F | 1960-11-10 | 12000.00 | B003 | SG5 | | SG5 | Susan | Brand | Manager | F | 1940-06-03 | 24000.00 | B003 | SL21 | | SL21 | John | White | Manager | M | 1945-10-01 | 30000.00 | B005 | NULL | | SL41 | Julie | Lee | Assistant | F | 1965-06-13 | 9000.00 | B005 | SL21 | | XY1 | New | Tester| Assistant | M | 1990-01-01 | 8000.00 | B002 | SL21 | **Columns Explanation:** - **staffNo**: Unique identifier for each staff member. - **fName**: First name of the employee. - **lName**: Last name of the employee. - **position**: Job role of the employee. - **sex**: Gender of the employee (M for Male, F for Female). - **DOB**
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

It has to be based on this table

The presented image is a table showcasing information about two individuals. The table contains six columns, each delineated by dashed lines for clear separation. Here's a detailed transcription:

- **E_name**: Susan Brand
- **E_salary**: 24000.00
- **E_age**: 83
- **M_name**: John White
- **M_salary**: 30000.00
- **M_age**: 78

### Explanation:

1. **Columns**:
   - **E_name**: Represents the employee's name.
   - **E_salary**: Indicates the employee's salary, formatted as a numerical value.
   - **E_age**: Displays the employee's age.
   - **M_name**: Represents the manager's name.
   - **M_salary**: Indicates the manager's salary, also formatted as a numerical value.
   - **M_age**: Displays the manager's age.

2. **Rows**:
   - The single data row provides detailed information corresponding to each column for Susan Brand and John White.

The table is primarily used to compare the salary and age information of an employee (E) and a manager (M) in a structured format.
Transcribed Image Text:The presented image is a table showcasing information about two individuals. The table contains six columns, each delineated by dashed lines for clear separation. Here's a detailed transcription: - **E_name**: Susan Brand - **E_salary**: 24000.00 - **E_age**: 83 - **M_name**: John White - **M_salary**: 30000.00 - **M_age**: 78 ### Explanation: 1. **Columns**: - **E_name**: Represents the employee's name. - **E_salary**: Indicates the employee's salary, formatted as a numerical value. - **E_age**: Displays the employee's age. - **M_name**: Represents the manager's name. - **M_salary**: Indicates the manager's salary, also formatted as a numerical value. - **M_age**: Displays the manager's age. 2. **Rows**: - The single data row provides detailed information corresponding to each column for Susan Brand and John White. The table is primarily used to compare the salary and age information of an employee (E) and a manager (M) in a structured format.
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education