Untitled

 avatar
user_9914919852
plain_text
2 years ago
272 B
1
Indexable
Never
SELECT CASE 
    WHEN Grades.Grade > 7 THEN Name ELSE NULL END 
    AS LabelName, Grades.Grade, Students.Marks FROM Students
    
INNER JOIN Grades ON Grades.Min_Mark <= Students.Marks AND Grades.Max_Mark >= Students.Marks
ORDER BY Grades.Grade DESC, LabelName, Marks