SELECT A.IFSC_ID, A.STAT_DT, SUBSTR(A.STAT_DT, 1,8) AS STAT_DD, SUBSTR(A.STAT_DT, 9,2) AS STAT_HH, A.SPED, A.TRVL_HH,                                     
       NVL(B.CMTR_GRAD_CD, 'LTC0') AS GRAD                                          
  FROM TB_IFSC_HH_STAT   A,                                                         
       TB_CMTR_GRAD_CLSF B,                                                         
       TB_IFSC           C                                                          
 WHERE A.STAT_DT BETWEEN '20171229000000' AND '20180124235959'                                           
   AND A.IFSC_ID = '2100000392'                                           
   AND A.IFSC_ID      = C.IFSC_ID                                                   
   AND B.SECT_GRAD_CD = C.SECT_GRAD_CD                                              
   AND (A.SPED >= B.LWST_TRVL_SPED AND A.SPED <= B.HGHS_TRVL_SPED)                  
