我有以下表格:如何獲得來自多個列的值的總和SQL
Season Name1 Goal1 Name2 Goal2 Name3 Goal3
1990 Smith 2 Abel 1 John 3
1990 Smith 1 Abel 1 John 1
1990 John 0 Smith 2 Abel 5
1991 John 1 Smith 1 Abel 2
1991 Abel 2 John 0 Smith 0
1992 Abel 3 John 0 Smith 1
季表示足球賽季,1,名稱顯示在一個給定的遊戲玩家位置 第1個目標指示進球數量名字1得分
我想爲每個賽季的每個名字生成一個列表,他們出場的次數和他們得分的目標數量。這樣的事情:
Abel 1990 3 games played 7 goals scored
Abel 1991 2 games played 4 goals scored
Abel 1992 1 games played 3 goals scored
John 1990 3 games played 2 goals scored
任何幫助,將不勝感激!
你不介意與我們分享至少一個相關的一塊你的努力 - [?你嘗試過什麼]剛剛在支持(http://whathaveyoutried.com/) – 2013-02-11 19:03:15