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 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started