首页 >数据库 >mysql教程 >mysql结果集合切换_MySQL

mysql结果集合切换_MySQL

WBOY
WBOY原创
2016-06-01 13:03:55898浏览

结果集A:

\

转换成为结果集B:

\

mysql中实现如下:

SELECT 
		a.biz_date,
		CASE  WHEN a.`event` = 'downClick' THEN a.uv END AS  downClick,
		CASE  WHEN a.`event` = 'successClick' THEN a.uv END AS  successClick,
		CASE  WHEN a.`event` = 'installSuccess' THEN a.uv END AS  installSuccess
from a


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn