Evaluate the SQL statement: SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a, (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_id) b WHERE a.dept_id = b.dept_id AND a.sal < b.maxsal; Which of the following statement is correct?"

🎲 Try a Random Question  |  Total Questions in Quiz: 56  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
SQL MCQs — practice the complete quiz, review flashcards, or try a random question.


Evaluate the SQL statement: SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a, (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_id) b WHERE a.dept_id = b.dept_id AND a.sal < b.maxsal; Which of the following statement is correct?"