按行显示的合计 select game, sum(purchase) as purchase_sum from purchase group by game; 按列显示的合计 select sum(case when game = 'action' end) as sum_action, sum(case when game = 'puzzle' end) as sum_puzzle, sum(case when game = 'RPG' end) as sum_rpg from purchas…