Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

What would the person you least admire do?

Answered: 1 week ago

Question

What are the strengths of each option?

Answered: 1 week ago

Question

What are the costs of each one?

Answered: 1 week ago