Given the relational algebra query
ρ_R(supplierId,averagePrice)_{supplierId}
F_{AVGunitPrice}(Product)ρR(supplierId,averagePrice)supplierIdFAVGunitPrice(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;
Given the relational algebra query ρ_R(supplierId,averagePrice)_{supplierId} F_{AVGunitPrice}(Product)ρR(supplierId,ave
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am