这是执行顺序的问题,
select sid avg(cmark) from mark where sid in (select sid from student where ssex='男') group by sid order by desc
where sid in (select sid from student where ssex='男')这是没有作用的
本文探讨了一个关于SQL执行顺序的问题,具体分析了一段包含子查询、聚合函数、分组及排序的复杂SQL语句,指出其中特定子句的实际作用。
这是执行顺序的问题,
select sid avg(cmark) from mark where sid in (select sid from student where ssex='男') group by sid order by desc
where sid in (select sid from student where ssex='男')这是没有作用的

被折叠的 条评论
为什么被折叠?