Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Which of the following is the correct query to get the average price at product _ class _ code for products having a product _

Which of the following is the correct query to get the average price at product_class_code for products having a product_price greater than the average product_price? In SQL QUERIES
Select only one option
SELECT PRODUCT_CLASS_CODE, AVG(PRODUCT_PRICE) AS AVG_PRICE
FROM PRODUCT
WHERE PRODUCT_PRICE >(
SELECT AVG(PRODUCT_PRICE)
FROM PRODUCT)
GROUP BY PRODUCT_CLASS_CODE;
SELECT PRODUCT_CLASS_CODE, PRODUCT_PRICE
FROM PRODUCT
WHERE PRODUCT_PRICE >(
SELECT AVG(PRODUCT_PRICE)
FROM PRODUCT)
GROUP BY PRODUCT_CLASS_CODE;
SELECT PRODUCT_CLASS_CODE, AVG(PRODUCT_PRICE) AS AVG_PRICE
FROM PRODUCT
WHERE PRODUCT_PRICE <(
SELECT AVG(PRODUCT_PRICE)
FROM PRODUCT)
GROUP BY PRODUCT_CLASS_CODE;

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxxviii Special Issue On Database And Expert Systems Applications Lncs 11250

Authors: Abdelkader Hameurlain ,Roland Wagner ,Sven Hartmann ,Hui Ma

1st Edition

3662583836, 978-3662583838

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

Prepare a constructive performance appraisal.

Answered: 1 week ago

Question

List the advantages of correct report formatting.

Answered: 1 week ago