ORACLE的直连数据在数据里分组汇总使用去重计数是正常的,使用字符串拼接会报错缺失右括号 RuntimeException: java.util.concurrent.ExecutionException: com.finebi.common.exception.conf.table.FineSqlErrorException: 错误代码:62400001The SQL : { -- USER_ID: f4218552-0777-4415-89d2-ff5bfe60bbd6 -- TABLE_NAMES: 613c8212118e4c88952d01d11f57a5ee -- CATEGORY_ID: 613c8212118e4c88952d01d11f57a5ee -- SUB_CATEGORY_ID: GROUP_1 select "v0" "__fcol_4", "v1" "__fcol_5", "v2" "__fcol_6", "v3" "__fcol_7" from ( select "x"."v0", "x"."v1", "x"."v2", "x"."v3", rownum "rn" from ( select "t0"."__fcol_0" "v0", "t0"."__fcol_1" "v1", "t0"."__fcol_2" "v2", "t0"."__fcol_3" "v3" from ( select "T_59D2558E8C3E4337AE999"."EQUIPMENT_SUBTYPE_DESC" "__fcol_0", "T_59D2558E8C3E4337AE999"."EQUIPMENT_ID" "__fcol_1", count(distinct "T_59D2558E8C3E4337AE999"."TRANS_RRN") "__fcol_2", substr( listagg(distinct "T_59D2558E8C3E4337AE999"."COMMENTS", '/' on overflow truncate '' without count ), 1, 1000 ) "__fcol_3" from (select t.*,em.equipment_subtype_desc from EQUIPMENT_EVENT_HISTORY t left join EQUIPMENT_MASTER em on em.equipment_rrn = t.equipment_rrn where t.EQUIPMENT_STATUS1 = 'DOWN' and t.STATUS_START_TIMESTAMP>=to_date('2024-10-21 15:33:11','yyyy-mm-dd hh24:mi:ss') and t.STATUS_START_TIMESTAMP<=to_date('2025-01-22 15:33:11','yyyy-mm-dd hh24:mi:ss') order by t.EQUIPMENT_ID DESC ) "T_59D2558E8C3E4337AE999" group by "T_59D2558E8C3E4337AE999"."EQUIPMENT_SUBTYPE_DESC", "T_59D2558E8C3E4337AE999"."EQUIPMENT_ID" ) "t0" ) "x" where rownum <= (0 + 5000) ) where "rn" > 0 order by "rn" } is wrong, please check!ORA-00907: 缺失右括号 |