Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Refer the given tables and answer the question that follow: Table : PURCHASE ORDER ORDER NO AMOUNT ORDER DATE CUSTOMER ID SALESMAN DELIVERY DATE NAME

image text in transcribed
Refer the given tables and answer the question that follow: Table : PURCHASE ORDER ORDER NO AMOUNT ORDER DATE CUSTOMER ID SALESMAN DELIVERY DATE NAME 1001 300 2001 05-03-2017 10-07-2017 1002 AJI SHALA 200.20 05-05-2017 10-10-2017 2002 1003 600 12-06-2017 2005 KABIR 12-08-2017 1004 400.25 2003 AKBAR 10-05-2017 03-08-2017 1005 500.10 10-07-2017 03-05-2017 2004 BABER 1006 400 10-07-2017 2005 HUSAIN 10-10-2017 a) Write an SQL query to display the ORDER NO and ORDER DATE from PURCHASE ORDER table who order the products between 05-03-2017 and 01-06-2017 b) Develop an SQL query to display the ORDER_NO, SALESMAN_NAME and extract the first three letters of ORDER_NO. Give an alias Name PRO_ORDER from the table PURCHASE ORDER. c) Write an SQL query to display the ORDER_NO, DELIVERY DATE and find the average of amount, also group the records based on ORDER_NO. (Hint: Use PURCHASE_ORDER table] d) Develop an SQL query to display the unique ORDER_NO and CUSTOMER ID for those SALEAMAN NAME ends with letter R. (Hint: PURCHASE _ORDER Table]

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Question What are the requirements for a SIMPLE 401(k) plan?

Answered: 1 week ago