解釋我想要做什麼有點困難(對於難以閱讀的標題抱歉),但基本上我想總結重複行如下:如何通過多列條件求和(SQL)
表A:
EntryID| Country | Region | Sales
101 | USA | North | $10
102 | USA | North | $5
103 | USA | South | $15
104 | USA | South | $10
105 | CHINA | North | $5
106 | CHINA | North | $5
107 | CHINA | South | $10
108 | CHINA | South | $20
所需的輸出:
EntryID| Country | Region | Sales
101 | USA | North | $15
103 | USA | South | $25
105 | CHINA | North | $10
107 | CHINA | South | $30
我怎樣才能做到這一點?
是什麼類型'sales'列? – potashin
在你想要的輸出中,你確定EntryID對每一行都是正確的嗎? (我會想象一些行的EntryID不止一個...) – Grantly