We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
select if(grades.grade<8,concat("NULL"),students.name),grades.grade,students.marks
from students inner join grades
on(students.marks>=grades.min_mark and students.marks<=grades.max_mark
)
group by grades.grade desc, students.name,students.marks desc;
the query say that students marks greater than or eql minimum mark and less than or eql ...see the grade table then think about input and output ....thats make u clear ...Happy Coding!!!
The Report
You are viewing a single comment's thread. Return to all comments →
Here is my MYSQL Soln:
select if(grades.grade<8,concat("NULL"),students.name),grades.grade,students.marks from students inner join grades on(students.marks>=grades.min_mark and students.marks<=grades.max_mark ) group by grades.grade desc, students.name,students.marks desc;
@tasfiahm