代码
select name as '姓名',
sum(case kemu when '语文' then store end ) as '语文',
sum(case kemu when '数学' then store end ) as '数学',
sum(case kemu when '英语' then store end ) as '英语',
sum(case kemu when '政治' then store end ) as '政治'
from storeinfo group by name
效果如下: