ACCP S1 C# 第十章上机练习

上机1
select StudentName,Phone, Address
from Student where Address like '山东%'

select SubjectName, ClassHour, GradeId
from Subject where SubjectName like '%数据库%'
order by GradeId

select StudentName, Phone, Address
from Student where Phone like '1387%'

select StudentNo, StudentName, Address
from Student where StudentName like '姜_'

select Id, StudentNo, SubjectId, StudentResult, ExamDate
from Result where StudentNo='S1101004' and SubjectId in(1,2,3)

select StudentNo, LoginPwd, StudentName, Sex, GradeId, Phone, Address, BornDate, Email
from Student where BornDate between '1989-1-1' and '1995-12-31'


上机2

select COUNT(*) as '学生总人数' 
from Student

select sum(ClassHour) as '第一学期的总学时'
from Subject where GradeId=1

select SUM(StudentResult) as 'S1101004学生第一学期的总成绩'
from Result,Subject where GradeId=1 and StudentNo='S1101004'

select AVG(StudentResult) as 'S1101004学生第一学期的平均分'
from Result,Subject where GradeId=1 and StudentNo='S1101004'

select MAX(StudentResult) as '最高分',MIN(StudentResult) as '最低分',AVG(StudentResult) as '平均分'
from Result,Subject where SubjectName='使用C#语言开发数据库应用系统' and ExamDate='2013-03-22'

select AVG(StudentResult) as '平均分'
from Result,Subject where SubjectName='使用C#语言开发数据库应用系统' and StudentResult>=60

select AVG(StudentResult) as '平均分'
from Result,Subject where SubjectName='使用C#语言开发数据库应用系统'

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值