GATE CS 2011 · Question 46 · Databases · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Database table by name Loan_Records is given below.
What is the output of the following SQL query?
SELECT count(*) FROM ( (SELECT Borrower, Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T );

BorrowerBank_ManagerLoan_Amount
RameshSunderajan10000.00
SureshRamgopal5000.00
MaheshSunderajan7000.00
  1. (A) 3
  2. (B) 9
  3. (C) 5
  4. (D) 6
Answer

Answer (C)

Answer from the official GATE CS 2011 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes