Names of the customers whose loan amount (L_Amt) is above 1000000.
Names of the customers whose loan amount (L_Amt) is above 1000000.
Official answer
SQL Query:
``sql
SELECT C_Name FROM CUSTOMERS, LOANS
WHERE CUSTOMERS.CID = LOANS.CID AND L_Amt > 1000000;
``
This joins CUSTOMERS and LOANS on the common column C_ID and returns only the names of customers whose loan amount exceeds ₹10,00,000.
Marking scheme
- 1.1 mark for the complete correct query with the join condition CUSTOMERS.C_ID = LOANS.C_ID and the filter L_Amt > 1000000; marks deducted if the join condition is missing.
Hint
Two-table questions need a join condition (common column) ANDed with the actual filter condition.
Quick oral answer
I join CUSTOMERS and LOANS on C_ID and then filter for L_Amt above 1000000, selecting only C_Name from the matched rows.
Common mistakes
- 1.Omitting the join condition CUSTOMERS.C_ID = LOANS.C_ID, which produces every possible customer-loan combination instead of matched pairs.
- 2.Forgetting that C_Name exists only in CUSTOMERS, not LOANS, and trying to select it without joining the tables.
Analysis and explanation
Since customer names live in CUSTOMERS but the loan amount lives in LOANS, the two tables must be joined before filtering.
Concept
- The join condition CUSTOMERS.CID = LOANS.CID matches each loan to its owning customer.
- The AND L_Amt > 1000000 condition then restricts the joined rows to high-value loans only.
Exam trap
- Forgetting the join condition produces a Cartesian product, matching every customer with every loan regardless of ownership — a serious logical error.
Interesting facts
A join without a matching condition is called a Cartesian product and can return N x M rows for tables of size N and M — a classic accidental-query mistake in real databases.
This comma-style implicit join is the classic-SQL equivalent of writing 'FROM CUSTOMERS INNER JOIN LOANS ON CUSTOMERS.C_ID = LOANS.C_ID', which CBSE also accepts.
Question details
Q38 of 48 questions
- Board
- CBSE
- Class
- Class 12
- Subject
- Computer Science
- Year
- 2026
- Section
- Section D
- Marks
- 1
- Type
- Short Answer
- Chapter
- Structured Query Language (SQL)
- Topic
- SQL Join between CUSTOMERS and LOANS using Common Key C_ID
- Bloom's level
- apply
- Syllabus topic
- Unit 2: Database Management — SQL: Equi-join of two tables using a common column (C_ID) with a WHERE condition
- Author
- CBSE
- Reviewed by
- Padhantu Academic Team
Spotted a mistake or something unclear?
Tell us and we will fix it.
Frequently asked questions
Why can't C_Name be selected directly from LOANS?
Because C_Name is a column in CUSTOMERS, not in LOANS; the two tables must be joined on C_ID before C_Name can be retrieved alongside loan details.
What happens if the join condition is left out?
SQL performs a Cartesian product, pairing every row of CUSTOMERS with every row of LOANS, which is both logically wrong and can return an enormous, meaningless result set.