ID a 1 3 2 4 3 4 4 7 5 7
累计求和 为以下形式ID a b1 3 32 4 73 4 114 7 185 7 25
SELECT ID, a, (SELECT SUM(a) FROM tb WHERE ID<=A.ID) AS bFROM tb AS A