To modify the code to count the occurrences of CrashIdentifier in the log_iOS_crash table, you can use a subquery and join it with the main query. Here's the modified code:

SELECT PlatformType, CrashIdentifier, COUNT(log_iOS_crash.crashid) AS index_crashcount_0
FROM log_iMonkey_Wechat_overview
LEFT JOIN log_iOS_crash ON log_iMonkey_Wechat_overview.CrashIdentifier = log_iOS_crash.crashid
WHERE Debug = 0 AND PlatformType != 0 AND CrashIdentifier != '' AND
  Ds >= toDateTime(#wechat_crash_level_time.start#) AND Ds <= toDateTime(#wechat_crash_level_time.end#)
GROUP BY PlatformType, CrashIdentifier

This query uses a LEFT JOIN to join the log_iMonkey_Wechat_overview table with the log_iOS_crash table based on the CrashIdentifier and crashid columns. The COUNT(log_iOS_crash.crashid) function is used to count the occurrences of CrashIdentifier in the log_iOS_crash table and is aliased as index_crashcount_0.


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

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