In my SQL Server 2014, I have this SQL query :
SELECT
MIN (dbo.GetActualValue(Price_Value, Discount)) AS ActualPrice,
IDHOTEL
FROM
HotelRoom
GROUP BY
IDHOTEL
dbo.GetActualValue => return @Price_Value - ((@Discount * @Price_Value) / 100)
How I can select Price_Value
, Discount
at the MIN
value ?
I need to calculate the price after discount (actual price), find out the minimum price after calculation (min actual price) I need to select the original price, discount at the place with the smallest actual price