Question: Specify the following additional queries on the database of Figure 3.5 in SQL. Show the query results if applied to the database of Figure 3.6.

Specify the following additional queries on the database of Figure 3.5 in SQL. Show the query results if applied to the database of Figure 3.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 we want the number of male employees in each department rather than all employees (as in Exercise 5.4a). Can we specify this query in SQL? Why or why not?

Step by Step Solution

3.39 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a SELECT DNAME COUNT FROM DEPARTMENT EMPLOYEE WHERE DNU... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

888-CS-DB (2291).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!