You are viewing a single comment's thread. Return to all comments →
SELECT CASE WHEN G.[Grade] < 8 THEN NULL ELSE S.[Name] END AS StudentName, G.[Grade] AS StudentGrade, S.[Marks] AS StudentMarks FROM Students AS S INNER JOIN Grades AS G ON S.[Marks] BETWEEN G.[Min_Mark] AND G.[Max_Mark] ORDER BY G.[Grade] DESC, CASE WHEN G.[Grade] >= 8 THEN S.[Name] ELSE CAST(S.[Marks] AS VARCHAR(20)) END ASC;
Seems like cookies are disabled on this browser, please enable them to open this website
The Report
You are viewing a single comment's thread. Return to all comments →