MSSQL - SQLServer - How to Calculate Max of Multiple Columns
Here is my table:
I want to know what is the max of bonus, salary or gambling for each user
Here is the query that will do it:
select CustomerName, (select Max(Numbers) from (Values (Bonus), (Salary), (Gambling) ) as TblNum(Numbers))
No comments:
Post a Comment