SELECT count(*) FROM cls WHERE isdel=0 and NOT EXISTS (SELECT 1 FROM ses_cls where cls.id = ses_cls.cls_id and year='') failed: