SELECT X.ATRD_ID, X.ATRD_NM, X.DRCT_CD, X.DRCT_CD_NM, X.DRCT_NM, X.ATRD_LENG,
       X.LINK_ID, X.LINK_SEQ, X.LINK_STRT_NM, X.LINK_END_NM, X.LINK_LENG,
       Y.STAT_DT, Y.STAT_HH, Y.DAY_TYPE_CD, Y.SPED
  FROM MV_ATRD_LINK X,
       (SELECT /*+ INDEX(A PK_LINK_HH_STAT) */
               A.STAT_DT, SUBSTR(A.STAT_DT, 9, 2) AS STAT_HH, A.LINK_ID, A.DAY_TYPE_CD, A.SPED
          FROM TB_LINK_HH_STAT A
         WHERE A.STAT_DT BETWEEN '20190601000000' AND '20190631235959'
           AND A.DAY_TYPE_CD IN ('DTW1', 'DTW2', 'DTW3', 'DTW4', 'DTW5', 'DTW6', 'DTW7')
       ) Y
 WHERE 1=1
   --AND X.ATRD_ID IN ('ATRD000100', '')
   --AND X.DRCT_CD = '0'
   AND X.LINK_ID = Y.LINK_ID
