Sql查询问题 因为我是初学者,所以本人在这请教各位大大。希望认真帮我看下题目。认真的解答。答对加分。

[复制链接]
查看11 | 回复0 | 2010-5-20 13:33:42 | 显示全部楼层 |阅读模式
1.select distinct subject.name from class,student_class,student_subject,subject where class.id = student_class.classid and student_class.student=student_subject.studentid andstudent_subject.subjectid = subject.ID and class.name = '1class'2.select student.* from student,student_subject,subject where student_subject.studentid=student.id and student_subject.subjectid=subject.id and subject.name='腔戚慎1subject'3.select avg(score) fromstudent_subject,subject where student_subject.subjectid=subject.id and subject.name='1subject'4.select max(score) fromstudent_subject,subject where student_subject.subjectid=subject.id and subject.name='伍敬仔者1subject'5.select min(score) fromstudent_subject,subject where student_subject.subjectid=subject.id and subject.name='1subject'
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行