admin 管理员组

文章数量: 1184232


2024年3月10日发(作者:中国系统架构师大会)

4 select sno, sname

from student

where sdept in (’JSJ’,’SX’,’WL’) and sage>25

group by sdept;

select sno, cno, grade/10.0+1 as level

from sc ;

select distinct sdept from student ;

select grade

from sc

where sno=’0001’and (cno=’1001’or cno=’1002’) ;

select count(*) from student where sname like ’%明% ’;

select avg(sage),max(sage) from student where sdept=’JSJ’;

select cno,sum(grade),avg(grade),max(grade),min(grade) from sc

group by cno

order by avg(grade) desc ;

select cno, avg(grade) from sc where cno in(‘1001’,’1002’)

group by cno ;

select ,avg(grade) from sc

group by

having avg(grade)>80 ;

select sno from sc group by sno having count(*)>2 ;

select cno from sc where grade>85 group by cno having count(*)=10 ;

select sno from sc group by sno having avg(grade)<60 ;

select sno from sc where grade<60 group by sno having count(*)>2 ;

select cno from student,sc where = and sdept=’JSJ’;

a:select sname from student,sc where = and cno=’1002’

b:select sname from student where sno in (select sno from sc where cno=’1002’)

select sno,grade from sc,course

where /doc/

o=/doc/ o and cname=’数据库原理’and grade <60

a:select sname from student ,sc,course

where = and /doc/

o=/doc/ o and grade>80 and cname=’数据库原

理’b:select sname from student where sno in (select sno from sc where grade>80 and cno in (select cno from course where

cname=’数据库原理’))

select sno,sname,avg(grade) from sc,student

where =

select sno from student where sno not in(select sno from sc x where grade< ( select avg(grade) from sc where

cno=/doc/ o) )

select sname from student x where sage> (

select avg(sage) from student where sdept=)


本文标签: 系统 架构师 中国 数据库