结构:学生,学生选修的课程。如何查询同时选修了物理和英语的学生信息,在数据库中可以
select * from student s where EXISTS(select 1 from stake ha where ha.stid=s.id and ha.subject='数学')
and EXISTS(select 1 from stake ha where ha.stid=s.id and ha.subject='英语');
ES我自己试着用了nested bool嵌套must查询不出来结果.