假设我有一个名为“myPlayerInfo”的表,其中包含以下行
'player name' 'number of goals'
'john' '10'
'martin' '20'
'jen' '20'
Q1。如何编写一个 sql 查询来打印一个新列,该列是“目标数”列的总和?
'player name' 'number of goals' 'Total goals by all players'
'john' '10' '50'
'martin' '20' '50'
'jen' '20' '50'
Q2。如何编写一个 sql 查询来打印一个新列,该列是每个球员的进球百分比以及我们在第一季度所做的总进球数列。?
'player name' 'number of goals' '% goals scored' 'Total goals by all players'
'john' '10' '20' '50'
'martin' '20' '40' '50'
'jen' '20' '40' '50'