select '价格' as '属性', sum(if(产品名称='nokia', 价格, 0)) as nokia, sum(if(产品名称='sanxing', 价格, 0)) as sanxing
union
select '体积' as '属性', sum(if(产品名称='nokia', 体积, 0)) as nokia, sum(if(产品名称='sanxing', 体积, 0)) as sanxing
union
select '厚度' as '属性', sum(if(产品名称='nokia', 厚度, 0)) as nokia, sum(if(产品名称='sanxing', 厚度, 0)) as sanxing
------解决方案--------------------