Home > Database > Mysql Tutorial > mysql结果集合切换_MySQL

mysql结果集合切换_MySQL

WBOY
Release: 2016-06-01 13:03:55
Original
901 people have browsed it

结果集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
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template