How to multiply values using SQL

后端 未结 4 1118
遥遥无期
遥遥无期 2021-01-13 02:03

Ok so I\'m working on my homework and am having trouble figuring out how to multiply with SQL and how to get this to order correctly.

I am supposed to \"create a que

4条回答
  •  深忆病人
    2021-01-13 02:55

    Here it is:

    select player_name, player_salary, (player_salary * 1.1) as player_newsalary
    from player 
    order by player_name, player_salary, player_newsalary desc
    

    You don't need to "group by" if there is only one instance of a player in the table.

提交回复
热议问题