Medium 3

 avatar
Manishyadav514
mysql
2 years ago
171 B
1
Indexable
Never
SELECT IF(GRADE > 7, NAME, NULL), GRADE, MARKS
FROM STUDENTS INNER JOIN GRADES
WHERE MARKS >= MIN_MARK AND MARKS <= MAX_MARK
ORDER BY GRADE DESC, NAME ASC, MARKS ASC;