Specify the following queries on the database in Figure 5.5 in SQL. Show the query results if

Question:

Specify the following queries on the database in Figure 5.5 in SQL. Show the query results if each query is applied to the database state in Figure 5.6.

a. For each department whose average employee salary is more than $30,000, retrieve the department name and the number of employees working for that department.

b. Suppose that we want the number of male employees in each department making more than $30,000, rather than all employees (as in Exercise 7.5a). Can we specify this query in SQL? Why or why not?


 Figure 5.5


Figure 5.6

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Fundamentals Of Database Systems

ISBN: 9780133970777

7th Edition

Authors: Ramez Elmasri, Shamkant Navathe

Question Posted: