Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE SCREENSHOT AND UPLOAD SPOOL FILE TO THIS professor is way too strict and needs the EXACT spool file. HERE IS THE CODE NUMBER 1

PLEASE SCREENSHOT AND UPLOAD SPOOL FILE TO THIS

professor is way too strict and needs the EXACT spool file.

image text in transcribed

image text in transcribed

HERE IS THE CODE

NUMBER 1

SELECT emp_no

FROM employees E, titles T, dept_emp DE, departments D

WHERE E.emp_no = T.emp_no AND E.emp_no = DE.emp_no AND DE.dept_no = D.dept_no AND title = 'Manager' AND dept_name = 'Research';

NUMBER 2

SELECT emp_no

FROM employee E, dept_emp DE

WHERE E.emp_no = DE.emp_no AND dept_no NOT IN(

SELECT dept_no

FROM departments

WHERE dept_name = 'Development'

) AND dept_no NOT IN(

SELECT dept_no

FROM departments

WHERE dept_name = 'Research'

);

NUMBER 3

SELECT first_name

FROM employees E, dept_manager DM, departments D

WHERE E.emp_no = DM.emp_no AND DM.dept_no = D.dept_no AND dept_name ='Sales';

NUMBER 4

SELECT COUNT(*) no_of_employees

FROM dept_emp

GROUP BY emp_no

HAVING COUNT(dept_id)>1;

NUMBER 5

SELECT first_name

FROM employees E, salaries S

WHERE E.emp_no = S.emp_no AND salary >= ALL(

SELECT salary

FROM salaries S, dept_emp DE, departments D

WHERE S.emp_no = DE.emp_no AND DE.dept_no = D.dept_no AND dept_name ='Sales'

);

SPOOLFILE SCREENSHOT NEEDED!!!! UPLOAD

Lab (50 points) Preliminary Login into Linux machine (oraclelinux.eng.fau.edu) Connect to database (e.g., sqlplus username/password) ALTER SESSION SET CURRENT_SCHEMA-yangk - Change line size: SET LINESIZE 400 Use Spool command to create log file for the output of SQL (e.g., SPOOL filename and SPOOL OFF) .Consider the following relational schema tities employees title CHARACTER VARYINGO) fromdate DATE birth, date DATE first name CHARACTER VARYING(14) da DATE salaries hire date DATE salary NUMERICI60) frem date DATE te date DATE dept no CHARACTER4)/ from date DATE to dateDATE / dept_m CHARACTER dept emp dept, no CHARACTER) from date DATE te date DATE

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

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions