tj11:
select max(c.teacher_age) 最大的年龄
from tb_teacher c
tj12:
select a.class_name 班级名称,b.student_name 学生姓名,b.gender 学生性别
from tb_class a join tb_student b on a.class_id=b.class_id
join tb_teacher c on a.teacher_id=c.teacher_id
where c.teacher_name='张老师'
视图:
select `c`.`teacher_name` AS `教师姓名`,`a`.`class_name` AS `班级名称`,count(`b`.`class_id`) AS `学生总数量` from ((`tb_class` `a` join `tb_student` `b` on((`a`.`class_id` = `b`.`class_id`))) join `tb_teacher` `c` on((`a`.`teacher_id` = `c`.`teacher_id`))) group by `b`.`class_id` having (count(`b`.`class_id`) > 5)