How to multiply values using SQL

后端 未结 4 1121
遥遥无期
遥遥无期 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:54

    You don't need to use GROUP BY but using it won't change the outcome. Just add an ORDER BY line at the end to sort your results.

    SELECT player_name, player_salary, SUM(player_salary*1.1) AS NewSalary
    FROM players
    GROUP BY player_salary, player_name;
    ORDER BY SUM(player_salary*1.1) DESC
    

提交回复
热议问题