this is not, it is SQL using microsoft SQL Server Management Studio Create a vie
ID: 3536748 • Letter: T
Question
this is not, it is SQL using microsoft SQL Server Management Studio
Create a view named OrderltemProducts that returns columns from the Orders, Order Items, and Products tables. This view should return these columns from the Orders table: OrderlD, OrderDate, TaxAmount, and ShipDate. This view should return these columns from the Orderltems table: ItemPrice, DiscountAmount, Fln.alPri.ce (the discount amount subtracted from the item price), Quantity, and ItemTotal (the calculated total for the item). This view should return the ProductName column from the Products table.Explanation / Answer
create view OrderItemProduct as (select OrderID, OrderDate, TaxAmount,ShipDate from Orders) union (select ItemPrice, DiscountAmount,ItemPrice-DiscountAmount AS "FinalPrice" ,Quantity, count(*) AS "ItemTotal" from OrderItems) union ( select ProductName from Product);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.