Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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).

image text in transcribed
image text in transcribed
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. c) Write an SQL query to display ORDER_NO, PRODUCT_NAME from table ORDER_DETAILS of products where the price is less than average price of products. (Hint: Use Subquery]. d) Write an SQL query to display ORDER_NO, PRODUCT_NAME and QUANTITY from PURCHASE_DETAILS table where the quantity is greater than all values in quantity for or products Windows Mouse and keybbard. (Hint: Use Subquery]. Go to Settings to activate Table : PURCHASE ORDER ORDER_NO AMOUNT ORDER_DATE CUSTOMER_ID SALESMAN_ID DELIVERY_DATE 1001 300 05-03-2017 2001 3001 1002 200.20 10-07-2017 2002 3003 3002 05-05-2017 10-10-2017 12-08-2017 1003 600 2005 1004 12-06-2017 10-05-2017 03-08-2017 2003 3004 10-07-2017 400.25 500.10 400 1005 2004 3005 03-05-2017 10-10-2017 1006 10-07-2017 2005 3006 PRICE 56 Table: PURCHASE DETAILS ORDER_NO PRODUCT_NAME 1001 KEYBOARD 1002 MONITOR 1003 MOUSE 1004 HARD DISK 1005 RAM QUANTITY 100 200 36 6 100 58 300 25 500 1007 CABINET 5 100

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago