Question:

What’s wrong in the following query?

   SELECT student_code, name
   FROM students
   WHERE marks = 
               (SELECT MAX(marks)
                  FROM students
                  GROUP BY subject_code);

Answer:

Here a single row operator = is used with a multiple row subquery.


Keywords:

© 2017 QuizBucket.org