这段代码存在语法错误。在第一个子查询的末尾缺少闭合括号")"。修正后的代码如下:

SELECT SUM(cnt) AS total_count, Ds FROM ( SELECT COUNT(DISTINCT AppIdentifier) AS cnt, Ds FROM log_iMonkey_iOS_overview GROUP BY Ds UNION ALL SELECT COUNT(DISTINCT AppIdentifier) AS cnt, Ds FROM log_iMonkey_Android_overview WHERE PlatformType != 0 AND AppIdentifier != 'identifier' GROUP BY Ds UNION ALL SELECT COUNT(DISTINCT PlatformType) AS cnt, Ds FROM log_iMonkey_Wechat_overview WHERE PlatformType != 0 GROUP BY Ds ) AS subquery GROUP BY D

SELECT SUMcnt AS total_countDsFROM select countDISTINCT AppIdentifier AS cntDs from log_iMonkey_iOS_overviewunion allselect countDISTINCT AppIdentifier AS cntDs from log_iMonkey_Android_overviewWHERE

原文地址: http://www.cveoy.top/t/topic/h8b8 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录