select GROUP_NO,sum(VAILD_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.TASK_ID=#{task_Id} GROUP BY GROUP_NO
select GROUP_NO,sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.TASK_ID=#{task_Id} GROUP BY GROUP_NO
select GROUP_NO,sum(VAILD_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.TASK_STATE_ID=#{task_State_Id} GROUP BY GROUP_NO
select GROUP_NO,sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.TASK_STATE_ID=#{task_State_Id} GROUP BY GROUP_NO
select GROUP_NO,sum(VAILD_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.CARD_TYPE=#{card_type} GROUP BY GROUP_NO
select GROUP_NO,sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.CARD_TYPE=#{card_type} GROUP BY GROUP_NO