You are viewing a single comment's thread. Return to all comments →
-- Using Select Case SELECT CASE WHEN G.Grade > 7 THEN CONCAT(S.NAME, ' ', G.Grade, ' ', S.Marks) ELSE CONCAT('NULL', ' ', G.Grade, ' ', S.Marks) END AS 'Tab' FROM Students S JOIN Grades G WHERE S.Marks BETWEEN G.Min_Mark and G.Max_Mark ORDER BY G.Grade DESC, S.NAME; -- Simplified Solution SELECT IF(Grade > 7 , Name, 'NULL'), Grade, Marks FROM Students JOIN Grades WHERE Marks BETWEEN Min_Mark and Max_Mark ORDER BY Grade DESC, Name;
Seems like cookies are disabled on this browser, please enable them to open this website
The Report
You are viewing a single comment's thread. Return to all comments →