Find all employees’ full names (lastname, firstname format) with salary, and their supervisor’s name with salary.

Use the NamanNavan (N2) Corporation database tables to design the following queries. (Use the spooling method to capture all queries and results in the CHAP7SP1.LST file.)


```
SQL> SELECT E.LNAME||', '|| E.FNAME "EMPNAME", E.SALARY "EMPSAL",
2 S.LNAME||', '|| S.FNAME "SUPERVISOR", S.SALARY "SUPSALARY"
3 FROM EMPLOYEE E, EMPLOYEE S
4 WHERE E.SUPERVISOR = S.EMPLOYEEID;

EMPNAME EMPSAL SUPERVISOR SUPSLARY
---------------------- ---------- ------------------- ----------------
HOUSTON, LARRY 150000 SMITH, JOHN 265000
ROBERTS, SANDI 75000 SMITH, JOHN 265000
MCCALL, ALEX 66500 DEV, DEREK 80000
DEV, DEREK 80000 SMITH, JOHN 265000
SHAW, JINKU 24500 GARNER, STANLEY 45000
GARNER, STANLEY 45000 SMITH, JOHN 265000
CHEN, SUNNY 35000 ROBERTS, SANDI 75000

7 ROWS SELECTED.
```

Computer Science & Information Technology

You might also like to view...

What does the following statement in C++ print to the screen? cout << “Hello students\n”;

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Network devices are tempting targets because they are ____.

A. concentrated B. dispersed C. unprotected D. easily carried

Computer Science & Information Technology

The ____________________ form layout displays fields across the screen in rows, with a label above each field.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Write a single statement that prints a number at random from each of the following sets:

a) 2, 4, 6, 8, 10. b) 3, 5, 7, 9, 11. c) 6, 10, 14, 18, 22.

Computer Science & Information Technology