title: To display the names of all students who have secured more than 50 in all subjects that they have appeared in
body: <p>Write a query to display the names of all students who have secured more than 50 in all subjects that they have appeared in, ordered by student name in ascending order.<a href="https://i.stack.imgur.com/KOsPh.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I have used this below query but didn't getting desired result as it is not comparing the result by grouping the student_id as whole.
  Can anyone suggest any changes in query please.</p>
  
  <pre><code>select distinct student_name from student s join mark m on
  s.student_id = m.student_id join subject sb
  on m.subject_id = sb.subject_id
  where m.value IN 
  (select value from mark m1 join student s1
  on m1.student_id = s1.student_id join subject sb1
  on m1.subject_id = sb1.subject_id
  where value &gt; 50 group by s1.student_id,m1.value, sb1.subject_id)
  order by 1;
  </code></pre>