课程表:courseId,courseName,tutor
学生表:studentId,studentName
Marks 表:marksId,studentId,courseId,marks
如果需要更多信息请评论
<\br>
CREATE VIEW maxmarks
AS
SELECT b.studentName,courseId from [dbo].[zz_16_Marks_tbl] a,[dbo].[zz_16_Student_tbl] b
WHERE a.studentId=b.studentId AND marks in(
SELECT MAX(marks),courseId FROM [dbo].[zz_16_Marks_tbl] GROUP BY courseId)