C. Refunds_697 REFUNDID ORDERID REFUNDDATE REFUNDAMOUNT 1 1 02-SEP-16 5 2 18-SEP-16 18 Refunds RefundID Customers Orders |CustomerID FirstName LastName OrderlD OrderID CustomerID OrderDate OrderAmount RefundDate RefundAmount

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Note : OrderDate is a Date Type
с.
Refunds_697
REFUNDID
ORDERID
REFUNDDATE
REFUNDAMOUNT
1
1
02-SEP-16
5
2
3
18-SEP-16
18
Customers
CustomerID
FirstName
LastName
Orders
OrderID
CustomerID
OrderDate
OrderAmount
Refunds
RefundID
OrderID
RefundDate
RefundAmount
Now Perform the following JOIN Operations
1. Find the Details of the Customers and their orders (only the Customers with orders)
CUSTOMERID FIRSTNAME LASTNAME
ORDERID
CUSTOMERID
ORDERDATE ORDERAMOUNT
Sara
Davis
1
1
01-SEP-16
10
2
Rumi
Shah
2
2
02-SEP-16
12.5
2
Rumi
Shah
3
е3-SEP-16
18
3
Paul
Johnson
4
3
15-SEP-16
20
4
Samuel
Martinez
5
4
21-NOV-20
20
Why Customer 2 appear twice ?
Why Customer 5 not appear in the output ?
2. Find the details of the customers with orders and refunds (join all 3 tables)
Transcribed Image Text:Note : OrderDate is a Date Type с. Refunds_697 REFUNDID ORDERID REFUNDDATE REFUNDAMOUNT 1 1 02-SEP-16 5 2 3 18-SEP-16 18 Customers CustomerID FirstName LastName Orders OrderID CustomerID OrderDate OrderAmount Refunds RefundID OrderID RefundDate RefundAmount Now Perform the following JOIN Operations 1. Find the Details of the Customers and their orders (only the Customers with orders) CUSTOMERID FIRSTNAME LASTNAME ORDERID CUSTOMERID ORDERDATE ORDERAMOUNT Sara Davis 1 1 01-SEP-16 10 2 Rumi Shah 2 2 02-SEP-16 12.5 2 Rumi Shah 3 е3-SEP-16 18 3 Paul Johnson 4 3 15-SEP-16 20 4 Samuel Martinez 5 4 21-NOV-20 20 Why Customer 2 appear twice ? Why Customer 5 not appear in the output ? 2. Find the details of the customers with orders and refunds (join all 3 tables)
Perform the following operations using ORACLE and provide relevant screen shots
in each case
Use appropriate syntax and datatypes
1. Create the following table(s) and enter given data values for each table using a SQL
Scripts
a. Customers_697(697 is last 3 digits of your student Number)
CUSTOMERID
FIRSTNAME
LASTNAME
1
Sara
Davis
Rumi
Shah
Paul
Johnson
Samuel
Martinez
sagara
Samarawickrama
** Customer ID 5 Enter your First Name and Last_Name
b.
Orders_697
ORDERID
CUSTOMERID
ORDERDATE ORDERAMOUNT
1
e1-SEP-16
10
e2-SEP-16
12.5
ез-SEP-16
18
4
15-SEP-16
20
21-NOV-20
20
Hint : TO_DATE('2020-11-21', 'YYYY/MM/DD') can be used to convert / insert date type
2.
2.
2.
Transcribed Image Text:Perform the following operations using ORACLE and provide relevant screen shots in each case Use appropriate syntax and datatypes 1. Create the following table(s) and enter given data values for each table using a SQL Scripts a. Customers_697(697 is last 3 digits of your student Number) CUSTOMERID FIRSTNAME LASTNAME 1 Sara Davis Rumi Shah Paul Johnson Samuel Martinez sagara Samarawickrama ** Customer ID 5 Enter your First Name and Last_Name b. Orders_697 ORDERID CUSTOMERID ORDERDATE ORDERAMOUNT 1 e1-SEP-16 10 e2-SEP-16 12.5 ез-SEP-16 18 4 15-SEP-16 20 21-NOV-20 20 Hint : TO_DATE('2020-11-21', 'YYYY/MM/DD') can be used to convert / insert date type 2. 2. 2.
Expert Solution
steps

Step by step

Solved in 6 steps with 7 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Why only sara and rumi appear in the output at last?

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question
FIRSTNAME
LASTNAME
ORDERDATE
ORDERAMOUNT
REFUNDDATE
REFUNDAMOUNT
Sara
Davis
01-SEP-16
10
02-SEP-16
5
Rumi
Shah
03-SEP-16
18
18-SEP-16
18
Explain the output
Why only Sara and Rumi apper in the output
3. Find the details of the Customers orders and refunds irrespective of whether they place
orders or having refunds
FIRSTNAME
LASTNAME
ORDERDATE
ORDERAMOUNT
REFUNDDATE
REFUNDAMOUNT
Sara
Davis
01-SEP-16
10
02-SEP-16
5
Paul
Johnson
15-SEP-16
20
Samuel
Martinez
21-NOV-20
20
Sagara
Samarawickrama
Rumi
Shah
02-SEP-16
12.5
Rumi
Shah
03-SEP-16
18
18-SEP-16
18
Explain the output
Why we see NULL values in certain columns
Transcribed Image Text:FIRSTNAME LASTNAME ORDERDATE ORDERAMOUNT REFUNDDATE REFUNDAMOUNT Sara Davis 01-SEP-16 10 02-SEP-16 5 Rumi Shah 03-SEP-16 18 18-SEP-16 18 Explain the output Why only Sara and Rumi apper in the output 3. Find the details of the Customers orders and refunds irrespective of whether they place orders or having refunds FIRSTNAME LASTNAME ORDERDATE ORDERAMOUNT REFUNDDATE REFUNDAMOUNT Sara Davis 01-SEP-16 10 02-SEP-16 5 Paul Johnson 15-SEP-16 20 Samuel Martinez 21-NOV-20 20 Sagara Samarawickrama Rumi Shah 02-SEP-16 12.5 Rumi Shah 03-SEP-16 18 18-SEP-16 18 Explain the output Why we see NULL values in certain columns
Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question
FIRSTNAME
LASTNAME
ORDERDATE
ORDERAMOUNT
REFUNDDATE
REFUNDAMOUNT
Sara
Davis
01-SEP-16
10
02-SEP-16
5
Rumi
Shah
03-SEP-16
18
18-SEP-16
18
Explain the output
Why only Sara and Rumi apper in the output
3. Find the details of the Customers orders and refunds irrespective of whether they place
orders or having refunds
FIRSTNAME
LASTNAME
ORDERDATE
ORDERAMOUNT
REFUNDDATE
REFUNDAMOUNT
Sara
Davis
01-SEP-16
10
02-SEP-16
5
Paul
Johnson
15-SEP-16
20
Samuel
Martinez
21-NOV-20
20
Sagara
Samarawickrama
Rumi
Shah
02-SEP-16
12.5
Rumi
Shah
03-SEP-16
18
18-SEP-16
18
Explain the output
Why we see NULL values in certain columns
Transcribed Image Text:FIRSTNAME LASTNAME ORDERDATE ORDERAMOUNT REFUNDDATE REFUNDAMOUNT Sara Davis 01-SEP-16 10 02-SEP-16 5 Rumi Shah 03-SEP-16 18 18-SEP-16 18 Explain the output Why only Sara and Rumi apper in the output 3. Find the details of the Customers orders and refunds irrespective of whether they place orders or having refunds FIRSTNAME LASTNAME ORDERDATE ORDERAMOUNT REFUNDDATE REFUNDAMOUNT Sara Davis 01-SEP-16 10 02-SEP-16 5 Paul Johnson 15-SEP-16 20 Samuel Martinez 21-NOV-20 20 Sagara Samarawickrama Rumi Shah 02-SEP-16 12.5 Rumi Shah 03-SEP-16 18 18-SEP-16 18 Explain the output Why we see NULL values in certain columns
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education