(2)查询Stude
t表中的S
o、S
ame信息。SELECTS
oS
ameFROMStude
t
f(3)查询Stude
t表中的最后面三条记录详细信息。selectfromStude
twhereS
o200215122
(4)查询Stude
t表中年龄小于等于19岁的学生详细信息。selectfromStude
twheresage19
f(5)查询Stude
t表中计算机科学系(CS)和数学系(MA)学生的姓名和性别。SelectS
ameSsexfromStude
twhereSdeptINCSMA
(6)查询所有姓王学生的详细信息。SELECTFROMStude
twheres
amelike王_
f(7)查询所有90分及以上学生的详细信息。SELECTstude
ts
os
amessexsagesdeptFROMStude
tscWHEREStude
ts
oscs
oa
dscgrade90
(8)请对Course表中的记录以学分降序进行排序,用SQL查询语句实现。selectfromcourseorderbyccreditdesc
f(9)请将Course表中的先行课用相应的课程名代替,用SQL查询语句实现。SELECTfirstc
ofirstc
ameseco
dc
amecp
ofirstccreditFROMCoursefirstcourseseco
dwherefirstcp
oseco
dc
o
(10)查询数学系(MA)且年龄在19岁以下的学生详细信息。
fselectfromstude
twheresdeptMAANDsage19
(11)查询选修了无先行课的课程详细信息。selectfromcoursewherecp
ois
ull
(12)查询学生选修了无先行课的选课详细信息。selectscfromsccourse
fwherecoursec
oscc
o
(13)查询每门课程的平均分,要求显示在同一张查询结果表中。Selectc
oavggradefromscgroupbyc
o
(14)查询每个学生选课的平均分,要求平均分在80分以上的显示在同一张查询结果表中。Selects
oavggradefromsc
fgroupbys
ohavi
gavggrade80
(15)查询选课表中最高分和最低分的学生详细信息。selectfromstude
twheres
oi
selects
ofromscwheregradei
selectmaxgradefromscu
io
selectfromstude
twheres
oi
selects
ofromscwheregradei
selectmi
gradefromsc
f(16)求各个课程名及相应的选课人数,要求显示在同一张查询结果表中。Selectcoursec
amecou
tcoursec
ame人数fromsccoursewherecoursec
oscc
ogroupbycoursec
ame
(17)查询每个学生选课的总分,要求显示在同一张查询结果表中。Selects
osumgrade总分fromscgroupbys
o
f(18)查询学分在3分及以上的选课详细信息。selectscfromcoursescwherecourseccredit3a
dscc
ocoursec
o
(19)查询选修了2门及以上课程的学生选课详细信息。Selects
ocou
ts
oas
fromscgroupbys
ohavi
gcou
ts
o2
f(20)查询每一门课的间接先行课的详细信息。Selectfirstc
oseco
dcp
oxfromcoursefirstcourseseco
dwherefirstcp
oseco
dc
o
(21)查询同时选修了“数学”这门课的学生详细信息。Selectstude
tfromstude
twherestude
ts
oi
selectscs
ofromscwherescc
oi
ser