#### 引用自:
#### 可授课学科为科学的教师
#### 执行时间:3.275,新脱敏库hfjy
#### 日期:2018-12-25
#### 需求方:张瑾
#### 数据输出方式:excel
#### created by:汪国强
#### update by:汪国强
#### checked by:

SELECT
  u.name 教师姓名,
  t.teacher_no 教师编号,
  (select value from bidata.gen_dict where type ='teaching_group' and code = tt.teaching_group) 学科组,
  (select group_concat(subject_name) from subject where subject_id in (select subject_id from teacher_subject_rel where teacher_id =t.teacher_id) having group_concat(subject_name) like '%科学%') 可教授学科
FROM
  view_teacher t
  left join view_user_info u on u.user_id = t.teacher_id
  left join view_tms_teacher_ext tt  on tt.id = t.teacher_id
WHERE
  t.quarters_type <> 5
  and u.name not like '%测试%' and u.name not like '%授课支持%'
  and (select group_concat(subject_name) from subject where subject_id in (select subject_id from teacher_subject_rel where teacher_id =t.teacher_id) having group_concat(subject_name) like '%科学%') is not null
文档更新时间: 2019-01-16 16:56   作者:admin