predict the output display the loan type and the number of customers under each loan type,considering only those loan types which are taken by more than one customer.
Answer options
A
Select loan_type,count(customer-id) from loans_taken l1 inner join loans l2 on l1
B
loan_id=l2 loan_id group by loan_type having count(customer_id)>1 order by
C
loan_type
Correct answer: Select loan_type,count(customer-id) from loans_taken l1 inner join loans l2 on l1, loan_id=l2 loan_id group by loan_type having count(customer_id)>1 order by, loan_type
Explanation
All three options together form the complete SQL query: SELECT loan_type, COUNT(customer_id) FROM loans_taken JOIN loans ON loan_id GROUP BY loan_type HAVING COUNT(customer_id)>1 ORDER BY loan_type.