select * from (( select col_A, sum(col_B) from table where col_B > 0 grou...
再加一欄?所以這一欄裡面的數字會都一樣喔~如果你意思是最後面再加一列,就是樓上大大回的。 select *,sum(col_B) over (PARTITION...
更新 select col_A, sum(col_B) as col_B from tableX where col_B>0 group by col_A...