--Using a reference to a calculated field within a VIEW
--DROP OrderItemsTotal
--DROP VIEW OrderItemsTotal

--CREATE VIEW using calculated fields
--CREATE VIEW OrderItemsTotal AS
--SELECT order_num
--, prod_id
--, quantity
--, item_price
--, quantity * item_price AS Calculated_Price
--FROM OrderItems

--the field reference MUST be qualified by the VIEW name
--SELECT *
--FROM OrderItemsTotal
--WHERE OrderItemsTotal.quantity >=250