动态sql语句拼接查询条件

    xiaoxiao2021-04-13  34

    SELECT t."NAME",TC.TASK_STATE,count(1),sum(case when tc.task_time < SYSDATE - 3 then 1 else 0 end) from T_BASE_TASK t,T_BASE_TASK_CUSTOMER tc where t.id = TC.TASK_ID and tc.task_STATE != 3 and tc.task_STATE != (case when t.NAME = '客户续保' then 2 else 4 end)  GROUP BY t."NAME",TC.TASK_STATE ORDER BY t.name
    转载请注明原文地址: https://ju.6miu.com/read-669318.html

    最新回复(0)