我是 SQL Server 的新手。请帮我找出两门课程成绩之间的关联关系。
我想找出哪个学生在“计算机编程”中获得“A”级,而在计算机概论中也获得“A”级。
这是数据的样子:
RollNum | CGPA | Status | Name | Grade
410 | 2.6 | Completed | Introduction to Computer Science | A
410 | 2.6 | Completed | Computer Programming | A-
422 | 3.2 | Completed | Introduction to Computer Science | A
422 | 3.2 | Completed | Computer Programming | A
223 | 3.52 | Completed | Introduction to Computer Science | A
223 | 3.52 | Completed | Computer Programming | A
521 | 1.2 | Completed | Introduction to Computer Science | B+
521 | 1.2 | Completed | Computer Programming | A-
....
....
这是我正在写的查询:
SELECT [RollNum],[CGPA],[Status],[Name],[FinalGrade]
FROM db
where Name ='Introduction to Computer Science' and FinalGrade='A'
and (Name='Computer Programming' and FinalGrade= 'A' )
请帮助我,在此先感谢。