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 05-03-2017 2001 AJI 05-05-2017 1002 200.20 10-07-2017 2002 SHALA 10-10-2017 1003 600 12-06-2017 2005 KABIR 12-08-2017 1004 400.25 10-05-2017 2003 AKBAR 10-07-2017 1005 500.10 03-08-2017 2004 BABER 03-05-2017 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]

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter11: Group Functions
Section: Chapter Questions
Problem 16MC
icon
Related questions
Question
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
05-03-2017
2001
AJI
05-05-2017
1002
200.20
10-07-2017
2002
SHALA
10-10-2017
1003
600
12-06-2017
2005
KABIR
12-08-2017
1004
400.25
10-05-2017
2003
AKBAR
10-07-2017
1005
500.10
03-08-2017
2004
BABER
03-05-2017
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]
Transcribed Image Text: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 05-03-2017 2001 AJI 05-05-2017 1002 200.20 10-07-2017 2002 SHALA 10-10-2017 1003 600 12-06-2017 2005 KABIR 12-08-2017 1004 400.25 10-05-2017 2003 AKBAR 10-07-2017 1005 500.10 03-08-2017 2004 BABER 03-05-2017 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]
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage