现在有:地区表area含字段id,学校表school含字段id,areaid,年级表grade含字
答案:2 悬赏:20 手机版
解决时间 2021-12-03 11:05
- 提问者网友:谁的错
- 2021-12-02 12:23
现在有:地区表area含字段id,学校表school含字段id,areaid,年级表grade含字
最佳答案
- 五星知识达人网友:天凉才是好个秋
- 2021-12-02 13:44
select count(id) from student where classid in(
select class.id from class where gradeid in (
select grade.id from grade where schoolid in(
select school.id from school where school.areaid in(
select area.id from area where area.id =1001
))))
select class.id from class where gradeid in (
select grade.id from grade where schoolid in(
select school.id from school where school.areaid in(
select area.id from area where area.id =1001
))))
全部回答
- 1楼网友:未来江山和你
- 2021-12-02 15:00
将n个表关联起来,再count
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯