Find details of all customers whose loan is greater than 10 lakhs.
sql>select customer.cust_name,customers.address from customers,loan,customer_loan where customers.cust_no=customer_loan.cust_no and Loan.loan_no=customer_loan_no and Loan.loan_amt>=10000;
List all customers whose name starts with 'ba'.
sql>select * from customers where cust_name like'ba%';
List names of all customers in descending order who has taken a loan in Nasik city
sql>select customers.cust_name,customers.address from customers,loan,customers,loan,customers_loan where cutomers.cust_no=customer_loan.cust_no and Loan.loan_no=customer_loan.loan_no and customers.city='nashik' orderd by customers.cust_name desc;
Display customer details having maximum loan amount.
sqlselect customers.cust_name,customers.address from customers,loan,customers,loan,customers_loan where cutomers.cust_no=customer_loan.cust_no and Loan.loan_no=customer_loan.loan_no and loan.loan_amt=(select ma(loan.loan_amt)from loan);
Calculate total of all loan amount.
sql>select sum(loan.loan_amt)from loan;
/