SELECT PlatformType AS PlatformType CASE WHEN PlatformType IN 1 3 5 7 THEN SELECT COUNTuuid FROM log_iOS_crash WHERE uuid = CrashIdentifier AND Ds = toDateTime#day_wechat_c
根据报错信息,缺少列'uuid'、'CrashIdentifier'和'Ds',可能是你的查询语句中的表没有这些列。请确认你的表结构和列名是否正确,并确保这些列存在于相应的表中。
此外,还有一个错误的地方是在子查询中你使用了别名'#day_wechat_crash_time.start#'和'#day_wechat_crash_time.end#'作为参数,这可能是无效的。请确保你正确地使用了相应的参数。
以下是修改后的代码示例:
SELECT
PlatformType AS PlatformType,
(CASE
WHEN PlatformType IN (1, 3, 5, 7) THEN (
SELECT COUNT(uuid)
FROM log_iOS_crash
WHERE uuid = CrashIdentifier
AND Ds >= toDateTime('2023-06-12 00:00:00')
AND Ds <= toDateTime('2023-07-11 23:59:59')
)
WHEN PlatformType IN (2, 4, 6, 8) THEN (
SELECT COUNT(uuid)
FROM log_android_crash
WHERE uuid = CrashIdentifier
AND Ds >= toDateTime('2023-06-12 00:00:00')
AND Ds <= toDateTime('2023-07-11 23:59:59')
)
ELSE 0
END) AS index_crashcount_0
FROM log_iMonkey_Wechat_overview
WHERE Debug = 0 AND PlatformType != 0 AND CrashIdentifier != '' AND
Ds >= toDateTime('2023-06-12 00:00:00')
AND Ds <= toDateTime('2023-07-11 23:59:59')
GROUP BY PlatformType
ORDER BY index_crashcount_0 DESC
LIMIT 5000
请注意,我在查询中直接使用了日期参数,你可以将其替换为你需要的具体日期。另外,请确保你的表结构和列名与查询中使用的一致
原文地址: http://www.cveoy.top/t/topic/hZFu 著作权归作者所有。请勿转载和采集!