SELECT SYST_ID,                                                
       DECODE(SYST_STTS_CD, 'SPS1', '1',                       
                            'SPS2', '1',                       
                            'SPS4', '2',                       
                                    '0') AS COMMSTATUS         
  FROM TB_UNIT_SYST_STTS                                       
 WHERE UPDT_DT >= TO_CHAR(SYSDATE-10/1440, 'YYYYMMDDHH24MISS') 
