q.SQL.Text:= 'select count(*) as cnt from LichDan where [Увольнение] ='+QuotedStr('По статье')+' and [Должность]='+QuotedStr('Инженер');