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