generate long running query for Teradata table : CREATE MULTISET TABLE CDMTDFMGR.CUPN_larger ,FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO,
     MAP = TD_MAP1
     (
      CUPN_NO BIGINT NOT NULL,
      TCKT_NO VARCHAR(30) CHARACTER SET LATIN CASESPECIFIC NOT NULL,
      CNSM_AT_ISSU_IND CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_TYPE_CD CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      MEDA_TYPE_CD CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_STS_CD CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      RFISC_CD CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      RFIC_CD CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_DT DATE FORMAT 'YYYY-MM-DD',
      SERV_DELV_PROV_LOCN_CD CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_PROV_NM VARCHAR(100) CHARACTER SET LATIN CASESPECIFIC,
      VALU_AMT BIGINT,
      VALU_CRNC CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      OPEN_DT DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CLOSE_DT DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CNSM_AT_ISSU_IND_1 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_TYPE_CD_1 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      MEDA_TYPE_CD_1 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_STS_CD_1 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      RFISC_CD_1 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      RFIC_CD_1 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_DT_1 DATE FORMAT 'YYYY-MM-DD',
      SERV_DELV_PROV_LOCN_CD_1 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_PROV_NM_1 VARCHAR(100) CHARACTER SET LATIN CASESPECIFIC,
      VALU_AMT_1 BIGINT,
      VALU_CRNC_1 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      OPEN_DT_1 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CLOSE_DT_1 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CNSM_AT_ISSU_IND_2 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_TYPE_CD_2 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      MEDA_TYPE_CD_2 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_STS_CD_2 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      RFISC_CD_2 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      RFIC_CD_2 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_DT_2 DATE FORMAT 'YYYY-MM-DD',
      SERV_DELV_PROV_LOCN_CD_2 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_PROV_NM_2 VARCHAR(100) CHARACTER SET LATIN CASESPECIFIC,
      VALU_AMT_2 BIGINT,
      VALU_CRNC_2 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      OPEN_DT_2 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CLOSE_DT_2 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CNSM_AT_ISSU_IND_3 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_TYPE_CD_3 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      MEDA_TYPE_CD_3 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_STS_CD_3 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      RFISC_CD_3 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      RFIC_CD_3 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_DT_3 DATE FORMAT 'YYYY-MM-DD',
      SERV_DELV_PROV_LOCN_CD_3 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_PROV_NM_3 VARCHAR(100) CHARACTER SET LATIN CASESPECIFIC,
      VALU_AMT_3 BIGINT,
      VALU_CRNC_3 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      OPEN_DT_3 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CLOSE_DT_3 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CNSM_AT_ISSU_IND_4 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_TYPE_CD_4 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      MEDA_TYPE_CD_4 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      CUPN_STS_CD_4 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      RFISC_CD_4 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      RFIC_CD_4 CHAR(1) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_DT_4 DATE FORMAT 'YYYY-MM-DD',
      SERV_DELV_PROV_LOCN_CD_4 CHAR(8) CHARACTER SET LATIN CASESPECIFIC,
      SERV_DELV_PROV_NM_4 VARCHAR(100) CHARACTER SET LATIN CASESPECIFIC,
      VALU_AMT_4 BIGINT,
      VALU_CRNC_4 CHAR(3) CHARACTER SET LATIN CASESPECIFIC,
      OPEN_DT_4 DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      CLOSE_DT_4 DATE FORMAT 'YYYY-MM-DD' NOT NULL)
PRIMARY INDEX ( CUPN_NO ,TCKT_NO );