解释SQL语句的含义

请解释一下这个SQL语句的含义:
select * from scholarship join (select * from student wh ere stu_ name is not null) s1 on scholarship.stu_ id=s1.id where s1.age=18;

img

查询scholarship这个表里的学生年龄是18的数据

select * from scholarship join (select * from student wh ere stu_ name is not null) s1 on scholarship.stu_ id=s1.id where s1.age=18;
首先看括号里面,这是个子查询,把select * from student wh ere stu_ name is not null的查询结果取个别名s1,当临时表用
然后把scholarship 和s1做联合查询,on后面的scholarship.stu_ id=s1.id是联合查询的关联条件
where s1.age=18是对整个结果再进行筛选,只留下年龄是18的记录
-=-=-=-=
整个的意思其实就是筛选学生年龄是18的数据
但由于scholarship 表里面没有年龄字段,需要先关联到student 表,然后找到年龄是18的数据