ECC Service, Service Task, SQL1

Description
Columns: Ecc Spec Id, Task Id, Creation Date, Task Number, Task Type Id, Task Status Id, Task Priority Id, Owner Id, Owner Type Code, Address ...
Imported from ECC
SELECT * FROM ( SELECT  ECC_SPEC_ID,TASK_ID,CREATION_DATE,TASK_NUMBER,TASK_TYPE_ID,TASK_STATUS_ID,TASK_PRIORITY_ID,OWNER_ID,OWNER_TYPE_CODE,ADDRESS,
                 PLANNED_START_DATE,PLANNED_END_DATE,SCHEDULED_START_DATE,SCHEDULED_END_DATE,ACTUAL_START_DATE,ACTUAL_END_DATE,
                 SOURCE_OBJECT_TYPE_CODE,SOURCE_OBJECT_ID,SOURCE_OBJECT_NAME,REASON_CODE, PRIVATE_FLAG, PUBLISH_FLAG, RESTRICT_SR_CLOSURE, PARENT_TASK_ID,
                 OPEN_FLAG,LOCATION_ID,LANGUAGE,FIELD_SERVICE_TASK_FLAG,ESCALATED_FLAG,AT_RISK_FLAG,PAST_DUE_FLAG,
                 DUE_DATE,LAST_UPDATE_DATE,SERVICE_REQUEST,CUSTOMER,ALERT,GROUP_OWNER_ID,INCIDENT_TYPE_ID,INCIDENT_OWNER_ID,OWNER_GROUP_ID,
                 TASK_SUBJECT,TASK_TYPE,STATUS,PRIORITY,OWNER,OWNER_TYPE,ASSIGNEE_NAME,ASSIGNEE_TYPE,AT_RISK,PAST_DUE  FROM CS_ECC_SERVICE_TASKS_V WHERE LANGUAGE in ('US'))
                PIVOT( MAX(TASK_SUBJECT) AS TASK_SUBJECT,
                 MAX(TASK_TYPE) AS TASK_TYPE,
                 MAX(STATUS) AS STATUS,
                 MAX(PRIORITY) AS PRIORITY,
                 MAX(OWNER) AS OWNER,
                 MAX(OWNER_TYPE) AS OWNER_TYPE,
                 MAX(ASSIGNEE_NAME) AS ASSIGNEE_NAME,
                 MAX(ASSIGNEE_TYPE) AS ASSIGNEE_TYPE,
                 MAX(AT_RISK) AS AT_RISK,
                 MAX(PAST_DUE) AS PAST_DUE
                for LANGUAGE in ('US' "US"))