Say we have a HouseItemPricefunction that runs. IN SQL, Write a simple query tha
ID: 3780519 • Letter: S
Question
Say we have a HouseItemPricefunction that runs. IN SQL,
Write a simple query that uses the created function to display information for ONLY the highest price item for Customer 107 on SKU AB75, shipped from Warehouse 19, 12, or 20
Function:
USE PricingManager
GO
CREATE FUNCTION ref.HouseItemPrice (
@CustomerID bigint,
@SKUString varchar(max),
@WarehouseString varchar(8000) = NULL
)
Explanation / Answer
SELECT * FROM PricingManager
WHERE CustomerID =107
AND SKUString ='AB75'
AND(WarehouseString ='12' OR WarehouseString ='19' OR WarehouseString ='20' );