You are viewing a single comment's thread. Return to all comments →
What's happening here?
While joining the tables in the 'on' expression I used 'betwwen and' operater to get the exact grade. It return 21 records same as the total no of records available in the student table. Then used 'if' to nullify the name of the students, who got less than 8 grade. Finally sorted the result as asked.
Did this answer your question?
Using the operator is fine, I was wondering how does one get the grades column with the help of this join. How does the operator map to the grades variable selected at the start?
If person's 'marks' in Marks table falls under a perticular range between 'Min_Mark' and 'Max_Mark' of grades table then that perticular grade will be mapped in the resultset.
Didn't know JOINS can be used in this way too. In your usage,
you are getting a grade as ouput based on the condition on
Marks which is kind of new.