Question: Consider the following query: Select Order_ID, Sum(Quantity*Unit_Price) as TotalAmount From Order_Line_t as OL inner join Product_t as P on OL.Product_ID = P.Product_ID Where Sum(Quantity*Unit_Price) >

Consider the following query:
Select Order_ID, Sum(Quantity*Unit_Price) as TotalAmount From Order_Line_t as OL inner join Product_t as P on OL.Product_ID = P.Product_ID Where Sum(Quantity*Unit_Price) > 300 Group by Order_ID
When we run the above query, we will get _____________.
| a. | every order ID that has total sales amount greater than $300 | |
| b. | an error message because we cannot join Order_Line_t with Product_t | |
| c. | an error message because we cannot use an aggregate function such as Sum(Quantity*Unit_Price) in the WHERE clause | |
| d. | an error message because Sum(Quantity*Unit_Price) in the WHERE clause should be replaced by TotalAmount | |
| e. | an error message because TotalAmount is not a valid column name |
Relationships for PVF Ch7-cho-Queries Salesperson_t Salesperson_ID Salesperson name Salesperson telephon Salesperson_fax Territory_ID Sales_territory_t Territory_ID Territory description Does_Business_in_t Territory_ID Customer_JD Customer_t Houstomer ID Customer_name Customer_address aty State Postal Code Order_line_t Order_ID Product ID Quantity Product Linet Product Line_ID product_line_Name Order_t Order ID Order_Date customer_ID Product Product ID product_Name Product Finish Unit Price on hand Product Description Product Line ID Work_Center ID Work_Center_t Work_Center ID Location Vendort Vendor_ID Vendor_name Vendor_address oty State Postal_Code Works_in_t Work_Center ID Employee_ID Employee_t Employee_ID Employee_name NEmployee_Address aty State Postal Code Supervisor_ID Hired_Date Usest Product ID Material ID Footage Raw_Materials_t Material ID Thickness Size Grade Material_description Footage_on_hand Unit_price Stills_ Sail ID Skill Description Low pay/hour High pay hour Suppliest Vendor_ID Material ID Unit_price Employee Sils Skillid Employee_id
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
