Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational schema bities emp no NUMERIC birth date DATE irst mame CHARACTER VARYING14 last name CHARACTER VARYING title CHARACTER VARYINGO from date

image text in transcribed

Consider the following relational schema bities emp no NUMERIC birth date DATE irst mame CHARACTER VARYING14 last name CHARACTER VARYING title CHARACTER VARYINGO from date DATE DATE salaries hire date DATE salary NUMERICE0 from-date DATE te date DATE dept.no CHARACTER) emp na NUMERIC frem date DATE to date DATE departments dept ne CHARACTERu dept emp emp.no NUMERIC dept no CHARACTER fram date DATE te date DATE The salaries table has the primary key named emp_no. . The titles table has the primary key nam 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. managed 'Finance' Department. department. 4) Retrieve the first and last names of employees whose salary was less than 65,000 and who 5) Retrieve the ids (i.e., emp-no) of employees who had worked in both 'Research, and Finance

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

Step: 3

blur-text-image

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago