You are viewing a single comment's thread. Return to all comments →
can someone tell me what's wrong with my query-`
with sheet as (select name,marks, case when marks between 0 and 9 then 1 when marks between 10 and 19 then 2 when marks between 20 and 29 then 3 when marks between 30 and 39 then 4 when marks between 40 and 49 then 5 when marks between 50 and 59 then 6 when marks between 60 and 69 then 7 when marks between 70 and 79 then 8 when marks between 80 and 89 then 9 when marks between 90 and 100 then 10 end as grade from students) select case when sheet.grade<8 then NULL else sheet.name end as NAME, sheet.grade as GRADE, sheet.marks as MARKS from sheet order by GRADE desc, case when GRADE>=8 then NAME else null END ASC, case when GRADE<8 then MARKS else null END desc;
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 →
can someone tell me what's wrong with my query-`