这句话分开的话可以进行,合在一起就不行了,有什么好的办法吗?
select a.a/b.b from select sum(score) as a from 表1 where id in (select student_id from 表2 where class='"+banji+"') a,(select count(student_id) as b from 表2 where class='"+banji+"') b";
...全文
741打赏收藏
关于查询语句
这句话分开的话可以进行,合在一起就不行了,有什么好的办法吗? select a.a/b.b from select sum(score) as a from 表1 where id in (select student_id from 表2 where class='"+banji+"') a,(select count(student_id) as b from 表2 where class='"+banji+"') b";