I have the following query:
SELECT [Rate], [RateMon], [RateTue], [RateWed], [RateThu], [RateFri], [RateSat], [RateSun] FROM [Room] WHERE Id=@Id
Instead of returning all columns, I just want to return Rate and the maximum value between RateMon, RateTue, RateWed, RateThu, RateFri, RateSat and RateSun, but it's hard for me because the column names are different.
The following is an example of returning a result:
100, 400, 400, 400, 400, 600, 600, 600
where 100 is speed and other values ββcorrespond to Mon - Sun, but I want to return only 100 and 600 in this case.
source share