Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART 2 : IBM DB2 (using subqueries) TO VIEW THE TABLE, IT IS IN DB2, CREATE SAMPLE THEN CONNECT TO SAMPLE AND SELECT * FROM

PART 2 : IBM DB2 (using subqueries)

TO VIEW THE TABLE, IT IS IN DB2, CREATE SAMPLE THEN CONNECT TO SAMPLE AND SELECT * FROM EMPLOYEE

image text in transcribed

image text in transcribed

I can't get it right, help me!

What This Exercise Is About This exercise provides an opportunity to work with subqueries. What You Should Be Able to Do At the end of the lab, you should be able to: Code basic subqueries Code more complex subqueries using the keyword IN Introduction See the data model at the start of this exercise guide to get the column names and descriptions for each table. Problem 3 List project number and duration (in days) of the project with the shortest duration. Name the derived column DAYS. Result PROJNO DAYS PL2100 257 Problem 4 List department number, department name, last name, and first name of all those employees in departments that have only male employees. Result DEPTNO DEPINAME LASTNAME FIRSTIME B01 PLANNING THOMPSON MICHAEL E01 SUPPORT SERVICES GEYER JOHN E21 SOFTWARE SUPPORT SPENSER THEODORE E21 SOFTWARE SUPPORT MEHTA RAMLAL E21 SOFTWARE SUPPORT LEE WING E21 SOFTWARE SUPPORT COUNOT JASON Problem 5 We want to do a salary analysis for people that have the same job and education level as the employee Stern. Show the last name, job, edlevel, the number of years they've worked as of January 1, 2000, and their salary. Name the derived column YEARS. Sort the listing by highest salary first. Result LASTNAME JOB EDLEVEL YEARS SALARY GEYER MANAGER 16 50 40175.00 PULASKI MANAGER 16 19 36170.00 STERN MANAGER 16 26 32250.00 HENDERSON MANAGER 16 29 29750.00 END OF Problem List With Expected Results What This Exercise Is About This exercise provides an opportunity to work with subqueries. What You Should Be Able to Do At the end of the lab, you should be able to: Code basic subqueries Code more complex subqueries using the keyword IN Introduction See the data model at the start of this exercise guide to get the column names and descriptions for each table. Problem 3 List project number and duration (in days) of the project with the shortest duration. Name the derived column DAYS. Result PROJNO DAYS PL2100 257 Problem 4 List department number, department name, last name, and first name of all those employees in departments that have only male employees. Result DEPTNO DEPINAME LASTNAME FIRSTIME B01 PLANNING THOMPSON MICHAEL E01 SUPPORT SERVICES GEYER JOHN E21 SOFTWARE SUPPORT SPENSER THEODORE E21 SOFTWARE SUPPORT MEHTA RAMLAL E21 SOFTWARE SUPPORT LEE WING E21 SOFTWARE SUPPORT COUNOT JASON Problem 5 We want to do a salary analysis for people that have the same job and education level as the employee Stern. Show the last name, job, edlevel, the number of years they've worked as of January 1, 2000, and their salary. Name the derived column YEARS. Sort the listing by highest salary first. Result LASTNAME JOB EDLEVEL YEARS SALARY GEYER MANAGER 16 50 40175.00 PULASKI MANAGER 16 19 36170.00 STERN MANAGER 16 26 32250.00 HENDERSON MANAGER 16 29 29750.00 END OF Problem List With Expected Results

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

More Books

Students also viewed these Accounting questions