SlideShare a Scribd company logo
1 of 5
CIS 336 Week 5 iLab 5 Devry University
Click this link to get the tutorial:
http://homeworkfox.com/tutorials/general-
questions/4154/cis-336-week-5-ilab-5-devry-university/
Lab 5 of 7: Retreiving data from Multiple Tables (28 points)

Submit your assignment to the Dropbox located on the silver tab at the top of this page. For
instructions on how to use the Dropbox, please click here.

(See Syllabus/"Due Dates for Assignments & Exams" for due dates.)

LABOVERVIEW

Scenario/Summary

Lab 5 deals with writing queries using multiple tables as covered in the reading and lecture
material this week. In some cases, you will be given the option to write a query using either the
TRADITIONAL method of joining tables or using the JOIN key word. In some cases, you will
be asked to use a specific approach. Using the incorrect process when the process is specified
will result in points being taken off for that problem.

The SELECT statement is the primary means of extracting data from database tables, and allows
you to determine exactly which data you want to extract by means of different comparison
operators used in the WHERE clause. This includes the use of specific "wild card" characters
which allow you to search for character or number patterns within the data. You can also
perform mathematical expressions within the SELECT statement to create derived output. The
ORDER BY clause allows you to sort the output data in either ascending (the default) or
descending order. Lab #5 will explore all of these applications of the SELECT statement.

General Lab Information and Considerations

This lab will utilize a set of tables found in the script file (LeeBooks.sql) found in the Doc
Sharing area of the website. If you have not yet downloaded this file from Doc Sharing then do
so now. Once you have downloaded the script file, import and run the script in SQL*Plus.

Each query in the script file you will create must be numbered (use --1 comments for numbering)
and in order. The SQL for the following exercises should be written using notepad and run in
SQL*Plus.

A Clean Script File:
A script file is meant to be like a program. The file can be run every time the code needs to be
executed without having to retype the code again each time. For this reason, it is important that
there are no errors in the code inside the file. You can go back and forth between Notepad and
Oracle when creating your script file to check your queries and verify if they work or not, but
you do not want to create your final output file until after you have verified that everything in
your script is correct by running it, in its entirety at least once and viewing the output. Once this
has been done, you can create your final output file, with echo on to create the document you can
turn in with your lab. If using a Spool Session, be sure to type "SPOOL OFF" AT THE SQL>
after your Script Stops Spooling!

Lab Do's and Don’t's

Do Not include the LEEBOOKS.SQL as part of your lab script.

Do use Notepad to write your query script file.

Do Not write your queries in Word.

Do test each query before moving on to the next.

Do Not include extra queries for a problem unless the problem explicitly asks for more than one
query.

Do test your queries before creating your final output file.

Do Not turn in a script file that has queries with errors.

Do number each query using --1 comment notation.

Do Not start your query on the same line as the comment.

Do remember to check your final output and script file for accuracy.

Do Not turn in your lab without first checking your output file to verify that it is correct.

Things to keep in mind:

If you are not sure of the table names in your user schema, you can use the following select
statement to list them.

SELECT * FROM TAB;

If you want to know the name of the columns in a particular table, you can use the following
command to list them.

DESC
Making a script file containing a series of describe statements for each table and then spooling
the output will give you a listing of all the tables with column names.

Be sure to review and verify your final output when you are finished. Do Not assume anything.

Write queries for each of the stated problems in the steps below that will return a result set of
data to satisfy the requirements. When finished, your script file should have a total of 13 queries
and your resulting output file should show both the query and result set for each.

Deliverables

Submit for grading:

Your script file with the 13 queries in it. Be sure your name, course number, and lab number are
in a comment area at the top of your file. Submitting ONLY your spooled output will result in a
10-point deduction.

An output file created using SET ECHO ON showing both the SQL code and the results.

Both documents must be zipped into a single file before submitting to the iLab Dropbox for
Week 5.

LABSTEPS

STEP 1:

Using the BOOKS and PUBLISHER tables, create a query using the traditional join method that
will return a list containing the book title, publisher contact person, and publisher phone number
for all publishers whose publisher name starts with an ‘R’.

STEP 2:

Using the DUAL table, create a query that will return the day of the week, hour, minutes, and
seconds of the current date setting on a computer. The day should be in all upper case.

STEP 3:

Using the BOOK_CUSTOMER and BOOK_ORDER tables, create a query using the
NATURAL JOIN method that will return a list containing the customer first name and last name
and the order number for all orders that have been shipped. Give the customer name column an
alias of "Customer Name" and order the output by the customer number in the BOOK_ORDER
table in ascending order.

STEP 4:
Using the BOOK_ORDER table, create a query that will return the order number, order date,
shipping address, city, state, and zip code for all orders going to Atlanta or Austin. Format the
order date to display as Month DD, YYYY and give the column an alias of "Date Ordered". Be
sure the month begins with a capital letter.

STEP 5:

Using the BOOK_ORDER table, create a query using the correct function to return the order
number, the date ordered, the date shipped, and a column representing the number of months
between the two dates for all columns where a date shipped exists. Format the number returned
from the function to display only two decimals, and give the column an alias of "Months
Between".

NOTE: Be sure that all of the numbers in the fourth column are positive numbers.

STEP 6:

Using the correct tables in your schema, create a query using either join operation that will list
the title of each book and author name(s). Give the title column an alias of "Book Title". Sort the
results by title and then by author last name.

STEP 7:

Using the BOOKS table, create a query that will return the book title, cost, and retail price for all
books with a title starting with the letter ‘H’. Use the correct conversion function to format the
cost and retail columns to show dollars and cents with a dollar sign (e.g., a price of $25 would
display $25.00 in the result set).

STEP 8:

Using the BOOK_ORDER, ORDER_ITEMS, and BOOKS tables, create a query using an
OUTER JOIN operation that will list the book title, order date, and order number for all books in
the BOOKS table. Order your output in descending order by ORDER_ITEMS.BOOKID. There
are three books that have never been ordered which should show up at the top of your listing.

STEP 9:

Using the correct tables, create a query using the traditional join operation that will list the
customer first and last name, book title, and order date (formatted as MM/DD/YYYY with an
alias of “Order Date”) for all the customers who have purchased books published by 'PRINTING
IS US'.

STEP 10:

Using the BOOKS and ORDER_ITEMS table, write a query using the correct Relational Set
Operator that will show all of the Book IDs in the BOOKS table that have not been ordered.
STEP 11:

Using the BOOK_CUSTOMER, BOOK_ORDER, ORDER_ITEMS, and BOOKS tables, create
a query using traditional join conditions based on comparisons between primary and foreign keys
that will list the customer number, first and last name, and book title. Limit your listing to only
those books in the ‘FITNESS’ category.

STEP 12:

Using the BOOKS, ORDER_ITEMS, and BOOK_ORDER tables, create a query that will list the
title, retail, quantity, and order date for all books ordered after April 30, 2009.

STEP 13:

Using the correct tables, create a query using either join operation you wish that will list the
order id, order date, quantity ordered, and retail price for every book that has been ordered.
Format the date as MM/DD/YYYY with an alias of “Order Date” and format the retail price
column using the correct function to show dollars and cents with a dollar sign ( $ ) and a column
alias of “Retail”.

This is the end of lab #5

More Related Content

What's hot

Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...
Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...
Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...GEBS Reporting
 
RefWorks How to version 1
RefWorks How to version 1RefWorks How to version 1
RefWorks How to version 1Traciwm
 
CIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEWCIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEWshyamuopuop
 
Altering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request FormAltering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request FormEdwin Jackson
 
Article marketing robot_instructions_how_to
Article marketing robot_instructions_how_toArticle marketing robot_instructions_how_to
Article marketing robot_instructions_how_totimegates
 
Salesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineSalesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineCyrille Coeurjoly
 
Sweeping out the cobwebs: Content auditing for large websites
Sweeping out the cobwebs: Content auditing for large websitesSweeping out the cobwebs: Content auditing for large websites
Sweeping out the cobwebs: Content auditing for large websitesNexer Digital
 
Mi 09 N4 Theodore Columbus Portfolio
Mi 09 N4 Theodore Columbus PortfolioMi 09 N4 Theodore Columbus Portfolio
Mi 09 N4 Theodore Columbus PortfolioTheodore Columbus
 

What's hot (10)

Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...
Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...
Generate Excel documents with Rational Publishing Engine 1.1.2 and Reporting ...
 
RefWorks How to version 1
RefWorks How to version 1RefWorks How to version 1
RefWorks How to version 1
 
CIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEWCIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEW
 
Schema plus
Schema plusSchema plus
Schema plus
 
Altering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request FormAltering Drop-Down Menus for Admissions IT Service Request Form
Altering Drop-Down Menus for Admissions IT Service Request Form
 
Article marketing robot_instructions_how_to
Article marketing robot_instructions_how_toArticle marketing robot_instructions_how_to
Article marketing robot_instructions_how_to
 
Salesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineSalesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command line
 
Sweeping out the cobwebs: Content auditing for large websites
Sweeping out the cobwebs: Content auditing for large websitesSweeping out the cobwebs: Content auditing for large websites
Sweeping out the cobwebs: Content auditing for large websites
 
WINDOWS 10
WINDOWS 10WINDOWS 10
WINDOWS 10
 
Mi 09 N4 Theodore Columbus Portfolio
Mi 09 N4 Theodore Columbus PortfolioMi 09 N4 Theodore Columbus Portfolio
Mi 09 N4 Theodore Columbus Portfolio
 

Viewers also liked

Bedroom to Boardroom: Sharing the Executive Suite #coupleExec
Bedroom to Boardroom: Sharing the Executive Suite #coupleExecBedroom to Boardroom: Sharing the Executive Suite #coupleExec
Bedroom to Boardroom: Sharing the Executive Suite #coupleExecMichael Robin
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 17Fase1
 
Croup clinical features, evaluation, and diagnosis
Croup  clinical features, evaluation, and diagnosisCroup  clinical features, evaluation, and diagnosis
Croup clinical features, evaluation, and diagnosisMartin Romero Torres
 
God gave me you
God gave me youGod gave me you
God gave me youmoshquh18
 
L’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSI
L’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSIL’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSI
L’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSIInstitut Protection Sociale
 
Project reclamation
Project reclamationProject reclamation
Project reclamationvkratan80
 

Viewers also liked (9)

Bedroom to Boardroom: Sharing the Executive Suite #coupleExec
Bedroom to Boardroom: Sharing the Executive Suite #coupleExecBedroom to Boardroom: Sharing the Executive Suite #coupleExec
Bedroom to Boardroom: Sharing the Executive Suite #coupleExec
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Clini data
Clini dataClini data
Clini data
 
Croup clinical features, evaluation, and diagnosis
Croup  clinical features, evaluation, and diagnosisCroup  clinical features, evaluation, and diagnosis
Croup clinical features, evaluation, and diagnosis
 
Social Media
Social Media Social Media
Social Media
 
God gave me you
God gave me youGod gave me you
God gave me you
 
Ips cp reforme_epargne_salariale_250215
Ips cp reforme_epargne_salariale_250215Ips cp reforme_epargne_salariale_250215
Ips cp reforme_epargne_salariale_250215
 
L’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSI
L’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSIL’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSI
L’Etat doit indemniser les entrepreneurs des dysfonctionnements du RSI
 
Project reclamation
Project reclamationProject reclamation
Project reclamation
 

Similar to Cis336 week 5 i lab 5

Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5wefsfewf
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5xcvxbdfbdf
 
Cis336 week 4 i lab 4
Cis336 week 4 i lab 4Cis336 week 4 i lab 4
Cis336 week 4 i lab 4CIS339
 
Cis336 week 4 i lab 4
Cis336 week 4 i lab 4Cis336 week 4 i lab 4
Cis336 week 4 i lab 4jackiechaner
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxjenkinsmandie
 
Advanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxAdvanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxCliffordBorromeo
 
Handouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysisHandouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysisCharleston Conference
 
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docxBUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docxhumphrieskalyn
 
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxCS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxannettsparrow
 
CS1100 Access Lab 1 Creating and Querying Database.docx
CS1100 Access Lab 1  Creating and Querying Database.docxCS1100 Access Lab 1  Creating and Querying Database.docx
CS1100 Access Lab 1 Creating and Querying Database.docxfaithxdunce63732
 
9 - Advanced Functions in MS Excel.pptx
9 - Advanced Functions in MS Excel.pptx9 - Advanced Functions in MS Excel.pptx
9 - Advanced Functions in MS Excel.pptxSheryldeVilla2
 
Microsoft Access ppt.ppt
Microsoft Access ppt.pptMicrosoft Access ppt.ppt
Microsoft Access ppt.pptJoshCasas1
 
ChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhh
ChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhhChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhh
ChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhhhazhamina
 
ChoiAccess.ppt
ChoiAccess.pptChoiAccess.ppt
ChoiAccess.pptljgmcrone
 
Part 1 - Microsoft AccessView GlossaryUse Access to create a.docx
Part 1 - Microsoft AccessView GlossaryUse Access to create a.docxPart 1 - Microsoft AccessView GlossaryUse Access to create a.docx
Part 1 - Microsoft AccessView GlossaryUse Access to create a.docxhoney690131
 
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxjack60216
 

Similar to Cis336 week 5 i lab 5 (20)

Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 4 i lab 4
Cis336 week 4 i lab 4Cis336 week 4 i lab 4
Cis336 week 4 i lab 4
 
Cis336 week 4 i lab 4
Cis336 week 4 i lab 4Cis336 week 4 i lab 4
Cis336 week 4 i lab 4
 
Cis336 week 4 i lab 4
Cis336 week 4 i lab 4Cis336 week 4 i lab 4
Cis336 week 4 i lab 4
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
 
Advanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxAdvanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptx
 
Handouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysisHandouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysis
 
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docxBUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
 
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxCS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
 
CS1100 Access Lab 1 Creating and Querying Database.docx
CS1100 Access Lab 1  Creating and Querying Database.docxCS1100 Access Lab 1  Creating and Querying Database.docx
CS1100 Access Lab 1 Creating and Querying Database.docx
 
9 - Advanced Functions in MS Excel.pptx
9 - Advanced Functions in MS Excel.pptx9 - Advanced Functions in MS Excel.pptx
9 - Advanced Functions in MS Excel.pptx
 
Microsoft Access ppt.ppt
Microsoft Access ppt.pptMicrosoft Access ppt.ppt
Microsoft Access ppt.ppt
 
ChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhh
ChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhhChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhh
ChoiAccess.pptbuhuhujhhuhuhuhuhuhhhhhhhhhhhhh
 
ChoiAccess.ppt
ChoiAccess.pptChoiAccess.ppt
ChoiAccess.ppt
 
Part 1 - Microsoft AccessView GlossaryUse Access to create a.docx
Part 1 - Microsoft AccessView GlossaryUse Access to create a.docxPart 1 - Microsoft AccessView GlossaryUse Access to create a.docx
Part 1 - Microsoft AccessView GlossaryUse Access to create a.docx
 
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
 

More from 7Fase1

Cis336 week 2 i lab 2
Cis336 week 2 i lab 2Cis336 week 2 i lab 2
Cis336 week 2 i lab 27Fase1
 
Cis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry universityCis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry university7Fase1
 
Cmgt410
Cmgt410Cmgt410
Cmgt4107Fase1
 
Cmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controlsCmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controls7Fase1
 
Cmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project taskCmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project task7Fase1
 

More from 7Fase1 (9)

Doc1
Doc1Doc1
Doc1
 
Doc1
Doc1Doc1
Doc1
 
Doc1
Doc1Doc1
Doc1
 
Cis336 week 2 i lab 2
Cis336 week 2 i lab 2Cis336 week 2 i lab 2
Cis336 week 2 i lab 2
 
Cis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry universityCis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry university
 
Cmgt410
Cmgt410Cmgt410
Cmgt410
 
Cmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controlsCmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controls
 
Cmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project taskCmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project task
 
Doc1
Doc1Doc1
Doc1
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Cis336 week 5 i lab 5

  • 1. CIS 336 Week 5 iLab 5 Devry University Click this link to get the tutorial: http://homeworkfox.com/tutorials/general- questions/4154/cis-336-week-5-ilab-5-devry-university/ Lab 5 of 7: Retreiving data from Multiple Tables (28 points) Submit your assignment to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the Dropbox, please click here. (See Syllabus/"Due Dates for Assignments & Exams" for due dates.) LABOVERVIEW Scenario/Summary Lab 5 deals with writing queries using multiple tables as covered in the reading and lecture material this week. In some cases, you will be given the option to write a query using either the TRADITIONAL method of joining tables or using the JOIN key word. In some cases, you will be asked to use a specific approach. Using the incorrect process when the process is specified will result in points being taken off for that problem. The SELECT statement is the primary means of extracting data from database tables, and allows you to determine exactly which data you want to extract by means of different comparison operators used in the WHERE clause. This includes the use of specific "wild card" characters which allow you to search for character or number patterns within the data. You can also perform mathematical expressions within the SELECT statement to create derived output. The ORDER BY clause allows you to sort the output data in either ascending (the default) or descending order. Lab #5 will explore all of these applications of the SELECT statement. General Lab Information and Considerations This lab will utilize a set of tables found in the script file (LeeBooks.sql) found in the Doc Sharing area of the website. If you have not yet downloaded this file from Doc Sharing then do so now. Once you have downloaded the script file, import and run the script in SQL*Plus. Each query in the script file you will create must be numbered (use --1 comments for numbering) and in order. The SQL for the following exercises should be written using notepad and run in SQL*Plus. A Clean Script File:
  • 2. A script file is meant to be like a program. The file can be run every time the code needs to be executed without having to retype the code again each time. For this reason, it is important that there are no errors in the code inside the file. You can go back and forth between Notepad and Oracle when creating your script file to check your queries and verify if they work or not, but you do not want to create your final output file until after you have verified that everything in your script is correct by running it, in its entirety at least once and viewing the output. Once this has been done, you can create your final output file, with echo on to create the document you can turn in with your lab. If using a Spool Session, be sure to type "SPOOL OFF" AT THE SQL> after your Script Stops Spooling! Lab Do's and Don’t's Do Not include the LEEBOOKS.SQL as part of your lab script. Do use Notepad to write your query script file. Do Not write your queries in Word. Do test each query before moving on to the next. Do Not include extra queries for a problem unless the problem explicitly asks for more than one query. Do test your queries before creating your final output file. Do Not turn in a script file that has queries with errors. Do number each query using --1 comment notation. Do Not start your query on the same line as the comment. Do remember to check your final output and script file for accuracy. Do Not turn in your lab without first checking your output file to verify that it is correct. Things to keep in mind: If you are not sure of the table names in your user schema, you can use the following select statement to list them. SELECT * FROM TAB; If you want to know the name of the columns in a particular table, you can use the following command to list them. DESC
  • 3. Making a script file containing a series of describe statements for each table and then spooling the output will give you a listing of all the tables with column names. Be sure to review and verify your final output when you are finished. Do Not assume anything. Write queries for each of the stated problems in the steps below that will return a result set of data to satisfy the requirements. When finished, your script file should have a total of 13 queries and your resulting output file should show both the query and result set for each. Deliverables Submit for grading: Your script file with the 13 queries in it. Be sure your name, course number, and lab number are in a comment area at the top of your file. Submitting ONLY your spooled output will result in a 10-point deduction. An output file created using SET ECHO ON showing both the SQL code and the results. Both documents must be zipped into a single file before submitting to the iLab Dropbox for Week 5. LABSTEPS STEP 1: Using the BOOKS and PUBLISHER tables, create a query using the traditional join method that will return a list containing the book title, publisher contact person, and publisher phone number for all publishers whose publisher name starts with an ‘R’. STEP 2: Using the DUAL table, create a query that will return the day of the week, hour, minutes, and seconds of the current date setting on a computer. The day should be in all upper case. STEP 3: Using the BOOK_CUSTOMER and BOOK_ORDER tables, create a query using the NATURAL JOIN method that will return a list containing the customer first name and last name and the order number for all orders that have been shipped. Give the customer name column an alias of "Customer Name" and order the output by the customer number in the BOOK_ORDER table in ascending order. STEP 4:
  • 4. Using the BOOK_ORDER table, create a query that will return the order number, order date, shipping address, city, state, and zip code for all orders going to Atlanta or Austin. Format the order date to display as Month DD, YYYY and give the column an alias of "Date Ordered". Be sure the month begins with a capital letter. STEP 5: Using the BOOK_ORDER table, create a query using the correct function to return the order number, the date ordered, the date shipped, and a column representing the number of months between the two dates for all columns where a date shipped exists. Format the number returned from the function to display only two decimals, and give the column an alias of "Months Between". NOTE: Be sure that all of the numbers in the fourth column are positive numbers. STEP 6: Using the correct tables in your schema, create a query using either join operation that will list the title of each book and author name(s). Give the title column an alias of "Book Title". Sort the results by title and then by author last name. STEP 7: Using the BOOKS table, create a query that will return the book title, cost, and retail price for all books with a title starting with the letter ‘H’. Use the correct conversion function to format the cost and retail columns to show dollars and cents with a dollar sign (e.g., a price of $25 would display $25.00 in the result set). STEP 8: Using the BOOK_ORDER, ORDER_ITEMS, and BOOKS tables, create a query using an OUTER JOIN operation that will list the book title, order date, and order number for all books in the BOOKS table. Order your output in descending order by ORDER_ITEMS.BOOKID. There are three books that have never been ordered which should show up at the top of your listing. STEP 9: Using the correct tables, create a query using the traditional join operation that will list the customer first and last name, book title, and order date (formatted as MM/DD/YYYY with an alias of “Order Date”) for all the customers who have purchased books published by 'PRINTING IS US'. STEP 10: Using the BOOKS and ORDER_ITEMS table, write a query using the correct Relational Set Operator that will show all of the Book IDs in the BOOKS table that have not been ordered.
  • 5. STEP 11: Using the BOOK_CUSTOMER, BOOK_ORDER, ORDER_ITEMS, and BOOKS tables, create a query using traditional join conditions based on comparisons between primary and foreign keys that will list the customer number, first and last name, and book title. Limit your listing to only those books in the ‘FITNESS’ category. STEP 12: Using the BOOKS, ORDER_ITEMS, and BOOK_ORDER tables, create a query that will list the title, retail, quantity, and order date for all books ordered after April 30, 2009. STEP 13: Using the correct tables, create a query using either join operation you wish that will list the order id, order date, quantity ordered, and retail price for every book that has been ordered. Format the date as MM/DD/YYYY with an alias of “Order Date” and format the retail price column using the correct function to show dollars and cents with a dollar sign ( $ ) and a column alias of “Retail”. This is the end of lab #5