Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational schema where eid and did are keys for their relations: Emp(eid:integer, ename:string, age:integer, salary:real) Works(eid:integer, did:integer, pc time:integer) Dept(did:integer, dname:string, budget:real,

Consider the following relational schema where eid and did are keys for their relations:

Emp(eid:integer, ename:string, age:integer, salary:real)

Works(eid:integer, did:integer, pc time:integer)

Dept(did:integer, dname:string, budget:real, managerid:integer)

Write a SQL query that:

(a) Print the names of every employee who works in Hardware, Software, and Research departments.

(b) Return the names of every department without any employee.

(c) Print the managerids of managers who manage only departments with budgets greater than $1.5 million.

(d) Print the name of employees whose salary is less than or equal to the salary of every employee.

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions

Question

Find the 15th term of the arithmetic sequence 2, 5, 8, c.

Answered: 1 week ago

Question

If you were the reader, how would the message make you feel?

Answered: 1 week ago

Question

Know how to use reservations systems to inventory demand.

Answered: 1 week ago