我有一个数据库查询select * from student;
学生表中有以下数据。
language countries know dontknow members -------- ------- ---- ------- -------- english USA 50000 20000 500000 french FRANCE 80000 30000 800000 jerman German 30000 40000 900000 italian Italy 20000 50000 700000 english USA 50000 20000 500000 french FRANCE 80000 30000 800000 jerman German 30000 40000 900000 italian Italy 20000 50000 700000
输出将是这样的:
country know(sum) dontknow(sum) members(sum) ------- -------- ------------- ------------ UsA 100000 40000 1000000 FRANCE 160000 60000 1600000 German 60000 80000 1800000 Italy 40000 100000 1400000
答案 0 :(得分:1)
您需要按国家/地区分组并汇总相关列:
6