ttles employees em NUMERICE emp NUMERICE O b date DATE CHARACTER VARYNG em date DATE ame CHARACTER VARYINO te dte DATE last name CHARACTER VARYING gender CHARACTER hie date DATE salaries MMERICE salary MUMERICen om date DATE date DATE dept_manager dept CHARACTER / m MUMERICS / em date DATE date DATE departments dep CHARACTER destame CHARACTER VARYNG dept emp em NUMERICE dept CHARACTERIA / fom date DATE da DATE laries table has the primary key named emp_no. es table has the primary key named emp_no. mployees table has the primary key named emp_no. pt_manager table has the composite primary key named (dept_no, emp_no). pt_emp table has the composite primary key named (emp_no, dept_no). partments table has the primary key named dept_no. laries table has a foreign key column named emp_no that references the employee table. es table has a foreign key column named emp_no that references the employee table. pt_manager table has a foreign key column named emp_no that references the employee table. pt_manager table has a foreign key column named dept_no that references the departments table. pt_emp table has a foreign key column named emp_no that references the employee table. pt_emp table has a foreign key column named dept_no that references the departments table. L statements for the following queries. etrieve the first and last names of employees whose title was 'Manager'. etrieve the first and last names of employees whose salary was less than 39,000. etrieve the first and last names of employees who managed 'Research' department nance' department. etrieve the first and last names of employees whose salary was less than 65,000 and wh anaged 'Finance' Department. etrieve the ids (i.e.. emp no) of emplovees who had worked in both 'Research' and 'Financ

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Consider the following relational schema.
titles
employees
emp_ne NUMERICE 0)
emp ne NUMERICEO)
title
CHARACTER VARYING)
from date DATE
to date DATE
birth date DATE
first mame CHARACTER VARYING(14
last name CHARACTER VARYING(16)
gender CHARACTER)
hire date DATE
salaries
emp ne NUMERICE0)
salary NUMERIC6.0)
from_date DATE
te date DATE
dept_manager
dept_no CHARACTERIA
emp no
ERICISO
from date DATE
to date DATE
departments
dept ne CHARACTERIA)
dept_name CHARACTER VARYINOJAO)
dept_emp
emp ne NUMERICS
dept ne CHARACTER()
from date DATE
date DATE
The salaries table has the primary key named emp_no.
The titles table has the primary key named emp_no.
• The employees table has the primary key named emp_no.
The dept_manager table has the composite primary key named (dept_no, emp_no).
The dept_emp table has the composite primary key named (emp_no, dept_no).
The departments table has the primary key named dept_no.
The salaries table has a foreign key column named emp_no that references the employee table.
The titles table has a foreign key column named emp_no that references the employee table.
The dept_manager table has a foreign key column named emp_no that references the employee table.
The dept_manager table has a foreign key column named dept_no that references the departments table.
The dept_emp table has a foreign key column named emp_no that references the employee table.
The dept_emp table has a foreign key column named dept_no that references the departments table.
Write SQL statements for the following queries.
1) Retrieve the first and last names of employees whose title was 'Manager'.
2) Retrieve the first and last names of employees whose salary was less than 39,000.
3) Retrieve the first and last names of employees who managed 'Research' department or
'Finance' department.
4) Retrieve the first and last names of employees whose salary was less than 65,000 and who
managed 'Finance' Department.
5) Retrieve the ids (i.e., emp_no) of employees who had worked in both 'Research' and 'Finance'
department.
Transcribed Image Text:Consider the following relational schema. titles employees emp_ne NUMERICE 0) emp ne NUMERICEO) title CHARACTER VARYING) from date DATE to date DATE birth date DATE first mame CHARACTER VARYING(14 last name CHARACTER VARYING(16) gender CHARACTER) hire date DATE salaries emp ne NUMERICE0) salary NUMERIC6.0) from_date DATE te date DATE dept_manager dept_no CHARACTERIA emp no ERICISO from date DATE to date DATE departments dept ne CHARACTERIA) dept_name CHARACTER VARYINOJAO) dept_emp emp ne NUMERICS dept ne CHARACTER() from date DATE date DATE The salaries table has the primary key named emp_no. The titles table has the primary key named emp_no. • The employees table has the primary key named emp_no. The dept_manager table has the composite primary key named (dept_no, emp_no). The dept_emp table has the composite primary key named (emp_no, dept_no). The departments table has the primary key named dept_no. The salaries table has a foreign key column named emp_no that references the employee table. The titles table has a foreign key column named emp_no that references the employee table. The dept_manager table has a foreign key column named emp_no that references the employee table. The dept_manager table has a foreign key column named dept_no that references the departments table. The dept_emp table has a foreign key column named emp_no that references the employee table. The dept_emp table has a foreign key column named dept_no that references the departments table. Write SQL statements for the following queries. 1) Retrieve the first and last names of employees whose title was 'Manager'. 2) Retrieve the first and last names of employees whose salary was less than 39,000. 3) Retrieve the first and last names of employees who managed 'Research' department or 'Finance' department. 4) Retrieve the first and last names of employees whose salary was less than 65,000 and who managed 'Finance' Department. 5) Retrieve the ids (i.e., emp_no) of employees who had worked in both 'Research' and 'Finance' department.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY