在arrayEnumerate(total)前加上一个逗号。修改后的SQL如下:

SELECT t, arraySum(arraySlice(total, 1, i)) as total_num FROM ( SELECT groupArray(min_Ds) as t, groupArray(app_count) as total from ( SELECT min_Ds, count(distinct AppIdentifier) as app_count FROM ( select AppIdentifier, min(Ds) as min_Ds from log_iMonkey_iOS_overview GROUP BY AppIdentifier ) GROUP BY min_Ds order by min_Ds ), arrayEnumerate(total) as i where t >= toDate(#accumulated_access_services.start#) ) LIMIT 100000

SELECT t arraySumarraySlicetotal 1 i as total_numFROM SELECT groupArraymin_Ds as t groupArrayapp_count as total from SELECT min_Ds countdistinct AppIdentifier as app_cou

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

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