Q3 Med
unknown
mysql
3 years ago
217 B
2
Indexable
Never
SELECT (CASE g.grade>=8 WHEN TRUE THEN s.name ELSE NULL END), g.grade, s.marks FROM students s INNER JOIN grades g ON s.marks BETWEEN min_mark AND max_mark ORDER BY g.grade DESC, s.name, s.marks;