Given the relational algebra query ρ_R(supplierId,averagePrice)_{supplierId} F_{AVGunitPrice}(Product)ρR​(supplierId,ave

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Given the relational algebra query ρ_R(supplierId,averagePrice)_{supplierId} F_{AVGunitPrice}(Product)ρR​(supplierId,ave

Post by answerhappygod »

Given the relational algebra query
ρ_R(supplierId,averagePrice)_{supplierId}
F_{AVGunitPrice}(Product)ρR​(supplierId,averagePrice)supplierId​FAVGunitPrice​(Product)
, which of the following SQL queries produced the equivalent
relation?
Choice 1 of 4:SELECT supplierId, AVG(unitPrice) as averagePrice
FROM Product GROUP BY supplierId;
Choice 2 of 4:SELECT supplierId, averagePrice,
supplierIdFAVGunitPrice FROM Product;
Choice 3 of 4:SELECT RENAME supplierId, averagePrice FROM
Product WHERE supplierId=supplierID AND unitPrice =
AVG(unitPrice);
Choice 4 of 4:SELECT supplierId, averagePrice FROM Product GROUP
BY unitPrice;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply