ocdc
asked on
SQL Questions
I need a query to get the below points: Tables are in the attached document. Thanks.
What would be the discounts for each line item on orders of five or more units?
o Columns to display: Orderid, Partid, Description, Qty, UnitPrice, OriginalCost, QuantityDeduction, and FinalCost
o give quantity discounts to encourage more sales.
· If an order contains five or more units of a given product we will give a 2% discount for that line item.
· If an order contains ten or more units of a given product we will give a 5% discount on that line item.
o Produce output that prints the orderid, partid, description, qty ordered, unit list price, the total original price(qty ordered * list price), the total discount value (shown as money or percent), and the total final price of the product after the discount.
o Display only those line items subject to the discount in ascending order by the orderid and partid.
o Use the CASE statement.
sqltables.doc
What would be the discounts for each line item on orders of five or more units?
o Columns to display: Orderid, Partid, Description, Qty, UnitPrice, OriginalCost, QuantityDeduction, and FinalCost
o give quantity discounts to encourage more sales.
· If an order contains five or more units of a given product we will give a 2% discount for that line item.
· If an order contains ten or more units of a given product we will give a 5% discount on that line item.
o Produce output that prints the orderid, partid, description, qty ordered, unit list price, the total original price(qty ordered * list price), the total discount value (shown as money or percent), and the total final price of the product after the discount.
o Display only those line items subject to the discount in ascending order by the orderid and partid.
o Use the CASE statement.
sqltables.doc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.