t.PROJECT_CODE AS "projectCode",
t.ACTIVITY_CODE AS "activityCode",
t.ACTIVITY_NAME AS "activityName",
t.ACTIVITY_PICTURE AS "activityPicture",
t.ACTIVITY_NOTE AS "activityNote",
t.ACTIVITY_STATUS AS "activityStatus",
t.ACTIVITY_TYPE AS "activityType",
t.AGREEMENT_CODE AS "agreementCode",
t.PARENT_TYPE AS "parentType",
t.PARENT_CODE AS "parentCode",
t.PARENT_ACTIVITY_CODE AS "parentActivityCode",
t.SUBSIDIARY_FLAG AS "subsidiaryFlag",
date_format(t.ACTIVITY_WARMUP_START_TIME,'%Y-%m-%d %H:%i:%s') AS "activityWarmupStartTime",
date_format(t.ACTIVITY_WARMUP_END_TIME,'%Y-%m-%d %H:%i:%s') AS "activityWarmupEndTime",
date_format(t.ACTIVITY_START_TIME,'%Y-%m-%d %H:%i:%s') AS "activityStartTime",
date_format(t.ACTIVITY_END_TIME,'%Y-%m-%d %H:%i:%s') AS "activityEndTime",
date_format(t.REGISTOR_START_TIME,'%Y-%m-%d %H:%i:%s') AS "registorStartTime",
date_format(t.REGISTOR_END_TIME,'%Y-%m-%d %H:%i:%s') AS "registorEndTime",
date_format(t.AUDIT_END_TIME,'%Y-%m-%d %H:%i:%s') AS "auditEndTime",
t.USER_CODE AS "userCode",
t.USER_NAME AS "userName",
t.PUBLISH_TIME AS "publishTime",
(
select count(1) from table_xxx_registry l where l.ACTIVITY_CODE = t.ACTIVITY_CODE and SUPPLIER_CODE = '00000000'
) as signUpCount
from table_xxx_activity t
where 1 = 1
and t.ACTIVITY_STATUS in ('02','03')
and t.BUSSINESS_TYPE IN ('2', '3')
and t.REGISTOR_START_TIME <= CURRENT_TIMESTAMP
and t.PARENT_TYPE in ('00')
and t.ACTIVITY_TYPE in ('46','47','48','49','52')
and t.PROJECT_CODE = 'PJ190906192410000007'
and EXISTS (
select 1 from table_xxx_registry l where l.ACTIVITY_CODE = t.ACTIVITY_CODE
)
AND EXISTS (
SELECT 1 FROM table_xxx_activity_areastore taa WHERE taa.ACTIVITY_CODE = t.ACTIVITY_CODE AND taa.AREA_CODE = '10001'
)
order by t.PUBLISH_TIME DESC