
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Define the following additional queries in SQL. to watch
Query results if applied to a
(a) per department employee average salary over $30,000,
Retrieve the name of the department and the number of its employees.
(b) Suppose we want the number of male employees in each department, can we define this query in SQL? Why and why not?

Transcribed Image Text:ΕMPLOYEΕ
Fname
Minit
Lname
Ssn
Bdate
Address
Sex Salary Super_ssn
Dno
123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555
333445555 1955-12-08 638 Voss, Houston, TX
999887777 1968-01-19 3321 Castle, Spring, TX
John
B
Smith
Franklin
Wong
M 40000 888665555
5
F 25000 987654321
43000 888665555
Alicia
J
Zelaya
Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX
4
Jennifer
F
4
Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TXM
English 453453453 1972-07-31 5631 Rice, Houston, TX
987987987 | 1969-03-29 980 Dallas, Houston, TX
38000 333445555
25000 333445555
25000 987654321
Ramesh
Joyce
Ahmad
V
Jabbar
M
4
James
E
Borg
888665555 1937-11-10 450 Stone, Houston, TX
M 55000 NULL
DEPARTMENT
DEPT_LOCATIONS
Dname
Dnumber
Mgr_ssn
Mgr_start_date
Dnumber
Dlocation
Research
5
333445555
1988-05-22
1
Houston
Administration
4
987654321
1995-01-01
4
Stafford
Headquarters
1
888665555
1981-06-19
Bellaire
Sugarland
5
Houston
WORKS_ON
PROJECT
Essn
Pno
Hours
Pname
Pnumber
Plocation
Dnum
123456789
32.5
ProductX
1
Bellaire
123456789
7.5
ProductY
Sugarland
666884444
3
40.0
ProductZ
3
Houston
453453453
20.0
Computerization
10
Stafford
4
453453453
2
20.0
Reorganization
20
Houston
333445555
10.0
Newbenefits
30
Stafford
333445555
3
10.0
333445555
10
10.0
DEPENDENT
333445555
20
10.0
Essn
Dependent_name
Sex
Bdate
Relationship
999887777
30
30.0
333445555
Alice
F
1986-04-05 Daughter
999887777
10
10.0
333445555
Theodore
M
1983-10-25
Son
987987987
10
35.0
333445555
Joy
F
1958-05-03
Spouse
987987987
30
5.0
987654321
Abner
M
1942-02-28| Spouse
987654321
30
20.0
123456789
Michael
M
1988-01-04
Son
987654321
20
15.0
123456789
Alice
F
1988-12-30
Daughter
888665555
20
NULL
123456789
Elizabeth
1967-05-05
Spouse
5
4.
5
KA
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 2 images

Knowledge Booster
Similar questions
- Simplify the following query (WHERE clause), expressed in SQL, on the example database above: SELECT ENAME, PNAME FROM EMP, ASG, PROJ WHERE (DUR > 12 OR RESP = "Analyst") AND EMP.ENO = ASG.ENO AND (TITLE = "Elect. Eng." OR ASG.PNO < "P3") AND (DUR > 12 OR RESP NOT= "Analyst") AND ASG.PNO = PROJ.PNOarrow_forwardConsider the following schema:instructor(ID, name, dept_name, salary)What is the correct SQL statement to perform a query to find the names of all instructors excluding duplicates?(a) select name from instructor;(b) select unique name from instructor;(c) select name from instructor no duplicates;(d) select distinct name from instructor;arrow_forwardAll parts of this question use the following database schema: Flights(flno, from, to, distance) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary) c) For each cruisingrange held by at least 3 aircraft, give the lowest salary of employees certified to fly one of those aircraft. Express in SQL only:arrow_forward
- EMPLOYEE Frame Minit Lname Sen Bdate Address Sex Salary Super sen Dno +444 DEPARTMENT Dname Dnumber Mor an Mgr start date DEPT LOCATIONS Dnumber Dlocation PROJECT Prame Prumber Plocation Dnum WORKS ON Ennn Pno Hoir Hours DEPENDENT Esen Dependent name Se Bdate Relationship Reforential integrity constraints displayed on the COMFWNY relational database schema. One possible database state for the COMPANY relational database schema. EMPLOYEE Fname Minit Lname John Frankin T Sex Salary 30000 333445555 5 M 40000 Jo00665555 F 25000 Joe7e54321 43000 J88Ge5556 San Bdate Address Super en Dno 123456789 1965-01-09 731 Fondren, Hounton, TX M 333445555 1955-12-08 638 Voas, Houston, TX Go0087777 1960-01-19 3321 Castle, Spring. TX 987654321 1941-06-20 291 Berry, Bellaire, TX Narayan 666884444 1962-09-15 975 Fire Oak, Humibile, TX M B Smith Wong Zelaya Wallace 5 Alicia 4 Jennifer F 38000 333445655 25000 333445555 M 25000 007654321 M 55000 NULL Ramesh English 453453453 1972-07-31 5631 Rice, Houston, TX F…arrow_forwardComputer Science provide SQL code (Use the EBOOKS database) When a course is offered in several sections taught by more than one instructor, students have the ability to choose an instructor, otherwise they have no choice. The deans of each college would like to know how many courses have only one section in the schedule, how many courses have more than 1 section, but taught by the same instructor, how many courses have sections taught by more than one instructor. Sort the results alphabetically by College ID as shown below: COLLEGE SINGLE_SECTION MULTISECTION_ONE_INSTRUCTOR MULTIPLE_INSTRUCTORS CAS 83 21 22 CED 76 8 39 COB 72 16 13arrow_forwardQuestion 35 If there are several operators with same priority in an arithmetic expression of an SQL statement then the priority will be For division for multiplication From left to right For additionarrow_forward
- Use SQL to query the inter assignee patent citations among top 100 assigneesarrow_forwardPlease provide the correct sql query for the questions. Thanksarrow_forwardUse the Pine Valley Furniture (PVF) database for this question. Write a SQL query to display the customer ID and total number of orders placed for those customers who placed more than one order.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY