Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started