Skip to main contentSkip to solution

From the table 'Students' and 'Graduates' below:

Students

Student_IDFirstNameLastName
1ArunSingh
2AjayVerma
3AshiKushwaha

Graduates

Graduate_IDFirstNameLastName
1DhruvManchandani
2AjayVerma
3AlokRanjan

If you want the names of the individuals who are listed in both the 'Students' and 'Graduates' tables, which SQL statement would you use?

Solution

✅ Correct Option: 3

Option 3 uses an INNER JOIN, which keeps only the rows that have a matching row in both tables, and it selects only FirstName and LastName. This is the join-based pattern for getting names that appear in both tables.


Options 2 and 4: they refer to a second table (Graduates) without listing it in FROM or joining it, so they are invalid.


We believe the answer should be Option 1, since the INTERSECT on all columns returns only the row that is identical in both tables (2, Ajay, Verma), whereas Option 3 joins on ID alone, so it would also pair Arun with Dhruv and Ashi with Alok, and its unqualified FirstName and LastName columns would be ambiguous. However, NTA's final answer key (after all challenges) says Option 3.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question