Question: 1) Write SQL to answer the following queries using the dept and emp tables described in this chapter: a. Find the departments where all the

 1) Write SQL to answer the following queries using the dept

1) Write SQL to answer the following queries using the dept and emp tables described in this chapter: a. Find the departments where all the employees earn less than their boss. b. Find the names of employees who are in the same department as their boss (as an employee). c. List the departments having an average salary greater than $25,000. d. List the departments where the average salary of the employees, excluding the boss, is greater than $25,000. e. List the names and manager of the employees of the Marketing department who have a salary greater than $25,000. f. List the names of the employees who earn more than any employee in the Marketing department. 2) Write SQL to answer the following queries using the monarch table described in this chapter: a. Who succeeded Victoria I? b. How many days did Victoria I reign? c. How many kings are there in the table? d. Which monarch had the shortest reign? 3) Write SQL to answer the following queries using the product and assembly tables: a. How many different items are there in the animal photography kit? b. What is the most expensive item in the animal photography kit? c. What is the total cost of the components of the animal photography kit? d. Compute the total quantity of all items required to assemble 15 animal photography kits

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!