문제 link
https://www.hackerrank.com/challenges/the-report/problem
Code link
https://github.com/JamesJung01/Hackerrank_sql/blob/main/02_Medium/The_Report.sql
SELECT IF(G.GRADE < 8, NULL, S.NAME), G.GRADE, S.MARKS FROM STUDENTS AS S JOIN GRADES AS G ON S.MARKS BETWEEN G.MIN_MARK AND G.MAX_MARK ORDER BY G.GRADE DESC, S.NAME;