Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please answer all three queations. thank you 1) Write SQL to answer the following queries using the dept and emp tables described in this chapter:
please answer all three queations. thank you
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started