title: write a query to this..?
body: <p>Students and Grades. Students contains three columns ID, Name and Marks, Grades-(grade,min_mark,max_mark)</p>
  
  <p>Ketty gives Eve a task to generate a report containing three columns:  Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades are entered first. If there is more than one student with the same grade (1-10) assigned to them, order those particular students by their name alphabetically. Finally, if the grade is lower than 8, use "NULL" as their name and list them by their marks in ascending order.</p>
  
  <p>Write a query to help Eve.</p>
  
  <p>Note
  Print "NULL"  as the name if the grade is less than 8.</p>
  
  <p>I have written this query :</p>
  
  <pre><code>select name,grade,marks from students s join grades g on marks between min_mark and max_mark
  where grade&gt;7
  order by 2 desc,name
  
  select translate(name,name,'NULL'),grade,marks from students s join grades g on marks between min_mark and max_mark
  where grade&lt;=7
  order by 3 desc
  </code></pre>
  
  <p>but don't know how to join these both queries.</p>