a ON tb.SIM=a.SIM_NUM
    WHERE 
     a.comp_id  ='11010001' and a.ba_id  ='11010'把where 改为 and试下