Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Table : PURCHASE ORDER ORDER_NO AMOUNT ORDER DATE CUSTOMER_ID SALESMAN_ID DELIVERY_DATE 1001 300 05-03-2017 2001 3001 05-05-2017 1002 200.20 10-07-2017 2002 3003 10-10-2017 1003 600

image text in transcribed

image text in transcribed

Table : PURCHASE ORDER ORDER_NO AMOUNT ORDER DATE CUSTOMER_ID SALESMAN_ID DELIVERY_DATE 1001 300 05-03-2017 2001 3001 05-05-2017 1002 200.20 10-07-2017 2002 3003 10-10-2017 1003 600 12-06-2017 2005 3002 12-08-2017 1004 400.25 10-05-2017 2003 3004 10-07-2017 1005 500.10 03-08-2017 2004 3005 03-05-2017 1006 400 10-07-2017 2005 3006 10-10-2017 Table: PURCHASE DETAILS ORDER_NO PRODUCT_NAME 1001 KEYBOARD PRICE QUANTITY 56 100 1002 MONITOR 36 200 1003 MOUSE 6 100 1004 HARD DISK 58 300 1005 RAM 25 500 1007 CABINET 5 100 a) Write a SQL query to display PRODUCT_NAME, ORDER_DATE and find number of years between the DELIVERY_DATE from the CURRENT DATE. (Hint: Use ON Clause). b) Write a SQL query to display matched records from PURCHASE_ORDER table and all records from PURCHASE_DETAILS

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

Students also viewed these Databases questions

Question

Question in Computer Science Please Write Correct answer 3 5 .

Answered: 1 week ago

Question

=+ Is secondary industrial action common and/or legal?

Answered: 1 week ago

Question

=+What sanctions are available to employers

Answered: 1 week ago

Question

=+ If strikes occur, are they legally regulated?

Answered: 1 week ago