0
List the deatails of students who passed the course
subject minimum is 30 and aggregate minimum is 90
3 RĂ©ponses
+ 4
Almost everyone completed the course who really wanted to learn
+ 2
SELECT * FROM StudentsTable WHERE (Subject1Score >= 30 AND Subject2Score >= 30 AND Subject3Score >= 30) ORDERBY TotalScore DESC
I just assumed you have at least three subjects (otherwise the question would probably only mention subject1 and subject2 and no 'aggregate').
So, if you have at least three subjects and you have to have at least grade 30 in each of them, surely the aggregate is at least 90 already, so no additional condition is required :)
+ 1
Select * From StudentTableName Where ScoreFieldName > 30 And < 90 Order By ScoreFieldName Desc