SELECT A.IFSC_ID, A.STAT_DT, 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 '20180115000000' AND '20180115235959'                                           
   AND A.IFSC_ID IN (SELECT B.IFSC_ID AS IFSC_ID                                    
                       FROM TB_ATRD_ROAD_RLTN A, TB_ROAD_IFSC_RLTN B, TB_IFSC C     
                      WHERE A.ROAD_ID = B.ROAD_ID                                   
                        AND B.IFSC_ID = C.IFSC_ID                                   
                        AND A.ATRD_ID  IN (SELECT ATRD_ID                           
                                            FROM TB_ATRD WHERE (ATRD_NM) = '±¹µµ46È£¼±')
                      GROUP BY B.IFSC_ID)                                           
   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)                  
