SELECT INCD_STRT_DT, B.CMMN_CD_KOR_NM, LINK_ID, INCD_TITL 
  FROM TB_INCD_OCRR A, 
       (SELECT CMMN_CD, CMMN_CD_KOR_NM 
          FROM TB_CMMN_CD 
         WHERE CMMN_CLSF_CD = 'IDTU' 
       ) B 
 WHERE INCD_STRT_DT BETWEEN '20140620000000' AND '20140620235959' 
   AND INCD_PRGR_STEP_CD   = 'ISS2' 
   AND A.INCD_TYPE_CLSF_CD = B.CMMN_CD




SELECT A.LINK_ID, B.PRCN_DT, A.CMTR_GRAD_CD, A.SPED 
  FROM TB_LINK_TRAF_HS A, 
       (SELECT LINK_ID, MAX(PRCN_DT) PRCN_DT 
          FROM TB_LINK_TRAF_HS 
         WHERE PRCN_DT BETWEEN '%S' AND '%S' 
           AND CMTR_GRAD_CD <> 'LTC1' 
         GROUP BY LINK_ID 
       ) B 
 WHERE A.LINK_ID = B.LINK_ID 
   AND A.PRCN_DT = B.PRCN_DT 
 ORDER BY 3 DESC


