SQL完成下面要求的查询语句
答案:3 悬赏:70 手机版
解决时间 2021-01-16 07:54
- 提问者网友:一抹荒凉废墟
- 2021-01-15 18:33
SQL完成下面要求的查询语句
最佳答案
- 五星知识达人网友:你哪知我潦倒为你
- 2021-01-15 20:11
字段名和数据不全,所以具体的值和字段名按照需求你可以调整下,比如所属院系,表示女生的数据是什么
1 select cname,cno from course
2 select sno,sname,grade from sc a, student b where a.sno=b.sno and grade<60 order by sno
3 select sname,sage,sdept from student where sage between18 and 21
4 select sno,sname,ssex from student where sname like '王%'
5 select sname,cname,sdept from course a,sc b,student c where a.cno=b.cno and b.sno=c.sno where c.ssex='F' and c.sname like '_中%'
6 select sno,sname,cname,grade from course a,sc b,student c where a.cno=b.cno and b.sno=c.sno where b.sno in (select sno from sc group by sno having count(*)>=4)
7 select sname,avg(grade),max(grade) from course a,sc b,student c where a.cno=b.cno and b.sno=c.sno group by sname order by avg(grade) desc
8 select cno,cname from
(select select cno,cname,count(*) sc_sno_count from
course a,sc b where a.cno=b.cno group by cno,cname) t1,
(select count(*) std_sno_count from student ) t2
where sc_sno_count=std_sno_count
1 select cname,cno from course
2 select sno,sname,grade from sc a, student b where a.sno=b.sno and grade<60 order by sno
3 select sname,sage,sdept from student where sage between18 and 21
4 select sno,sname,ssex from student where sname like '王%'
5 select sname,cname,sdept from course a,sc b,student c where a.cno=b.cno and b.sno=c.sno where c.ssex='F' and c.sname like '_中%'
6 select sno,sname,cname,grade from course a,sc b,student c where a.cno=b.cno and b.sno=c.sno where b.sno in (select sno from sc group by sno having count(*)>=4)
7 select sname,avg(grade),max(grade) from course a,sc b,student c where a.cno=b.cno and b.sno=c.sno group by sname order by avg(grade) desc
8 select cno,cname from
(select select cno,cname,count(*) sc_sno_count from
course a,sc b where a.cno=b.cno group by cno,cname) t1,
(select count(*) std_sno_count from student ) t2
where sc_sno_count=std_sno_count
全部回答
- 1楼网友:忘川信使
- 2021-01-15 22:18
1、select cname ,cno from course;
2、select a.sno a.sname b.grade from student a left join sc b on a.sno =b.sno where b.grade <60 order by a.sno asc;
。。。其它就交给有缘人了
2、select a.sno a.sname b.grade from student a left join sc b on a.sno =b.sno where b.grade <60 order by a.sno asc;
。。。其它就交给有缘人了
- 2楼网友:玩世
- 2021-01-15 20:50
1.select cname , cno from course;
2.select a.sno,sname,grade from student a,sc b
where a.sno = b.sno and grade<'60' order by a.sno asc
3.select sname,sage
大哥你这提示也不全啊!没法往下写啊(所属院系和政治面貌?)
2.select a.sno,sname,grade from student a,sc b
where a.sno = b.sno and grade<'60' order by a.sno asc
3.select sname,sage
大哥你这提示也不全啊!没法往下写啊(所属院系和政治面貌?)
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯