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 DETAILS ORDER_NO PRODUCT_NAME 1001 KEYBOARD PRICE QUANTITY 100 56 1002 MONITOR 36 200

image text in transcribed

Refer the given tables and answer the question that follow: Table: PURCHASE DETAILS ORDER_NO PRODUCT_NAME 1001 KEYBOARD PRICE QUANTITY 100 56 1002 MONITOR 36 200 1003 MOUSE 6 100 1004 58 300 HARD DISK RAM 1005 25 500 1007 CABINET 5 100 | a) Write an SQL query to display the ORDER_NO, PRODUCT_NAME and PRICE details of products with PRODUCT_NAME having 'a' letter exist in any position in the PRODUCT_NAME column values and amount is greater than 200. [Hint: Use PURCHASE_DETAILS table]. b) Develop an SQL query to display the ORDER_NO, PRODUCT_NAME and the length of values in ORDER_NO column. Give an alias Name LEN_ORDER from the table PURCHASE_DETAILS c) Write a SQL query to display the TOTAL Price of products for each ORDER_NO group [Hint: Use PURCHASE_DETAILS table]. d) Develop an SQL query to display the unique ORDER_NO and PRICE for those products whose QUANTITY is either 200 OR 100 [Hint: PURCHASE_DETAILS 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_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 ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

To identify HRM functions when it is created.

Answered: 1 week ago