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