Among the students who got a B in the course Machine Learning Theory, how many of them have a gpa of over 3?
B refers to grade; GPA is an abbreviated name of Grade Point Average where over 3 refers to gpa > 3;
SELECT COUNT(student_id) FROM registration WHERE grade = 'B' AND student_id IN ( SELECT student_id FROM student WHERE gpa > 3 AND course_id IN ( SELECT course_id FROM course WHERE name = 'Machine Learning Theory' ) )