Answered step by step
Verified Expert Solution
Link Copied!

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
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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Q.1. Taxonomic classification of peafowl, Tiger and cow ?

Answered: 1 week ago

Question

Q .1. Different ways of testing the present adulterants ?

Answered: 1 week ago