select
if(GRADE<8,NULL,NAME),
GRADE,MARKS
FROM STUDENTS AS S JOIN GRADES AS G
WHERE S.MARKS BETWEEN G.MIN_MARK AND G.MAX_MARK
ORDER BY GRADE DESC, NAME ASC;
this solution works like charm. I solved it by using another method. but i don't get why there is no ON keyword used while joining. i can't find any reliable solution. please suggest me some link for a good read on this topic and explain this thing.
Don’t forget that this is a Laravel forum, not a MySQL forum. That doesn’t mean SQL is off-topic, but questions that are only about SQL and have nothing to do with Laravel are probably better asked elsewhere.