0

List the deatails of students who passed the course

subject minimum is 30 and aggregate minimum is 90

19th Feb 2017, 2:48 AM
nayana
3 Answers
+ 4
Almost everyone completed the course who really wanted to learn
19th Feb 2017, 7:21 AM
Utkαrsh
Utkαrsh - avatar
+ 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 :)
19th Feb 2017, 8:28 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
Select * From StudentTableName Where ScoreFieldName > 30 And < 90 Order By ScoreFieldName Desc
19th Feb 2017, 5:37 AM
Andre van Rensburg
Andre van Rensburg - avatar