1.SUM中:
SUM(CASE phoneType WHEN 'iOS' THEN status ELSE 0 END) AS iOSClick,
SUM(CASE phoneType WHEN 'WeChat' THEN status ELSE 0 END) AS weChatClick,
SUM(CASE phoneType WHEN 'Android' THEN status ELSE 0 END) AS androidClick
2.COUNT中:
COUNT(DISTINCT CASE phoneType WHEN 'iOS' THEN id END) AS iOSPush,
COUNT(DISTINCT CASE phoneType WHEN 'WeChat' THEN id END) AS weChatPush,
COUNT(DISTINCT CASE phoneType WHEN 'Android' THEN id END) AS androidPush,