Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relations: Emp (id, name, age, salary) Dept (did, name, street, city, budget, managerid) Works (eid, did, pct_time) *eid stands for employee id

Consider the following relations: Emp (id, name, age, salary) Dept (did, name, street, city, budget, managerid) Works (eid, did, pct_time) *eid stands for employee id Write the following queries in SQL. No duplicates should be printed in any of the answers. a. Find the names of employees who have not worked in Education department. b. Find the names of all employees working in a department managed by Gates. c. Find the age of the oldest employee who has either worked part time (pct_time < 100) or having a salary more than 35,000. d. Find the names of employees who have worked in two departments located in the same city. e. For each level of age group, display the level and average salary of employees for that level. f. Find the names of employees who have worked in all departments.

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_2

Step: 3

blur-text-image_3

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

Students also viewed these Databases questions

Question

Find the derivative. f(x) 8 3 4 mix X O 4 x32 4 x32 3 -4x - x2

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago