Which of the following queries will give you the supplier with the maximum average price of products?
SQL MCQs
For a table with the following columns:
product_id, product_name, supplier_id, price
Which of the following queries will give you the supplier with the maximum average price of products?
Answer
Correct Answer:
SELECT supplier_id, avg(price) FROM Products group by supplier_id having avg(price) in (Select max(avg_price) from (Select avg(price) as avg_price from products group by supplier_id))
Explanation:
Note: This Question is unanswered, help us to find answer for this one