DBMS Case-2
DBMS Case-2
Case Study 2
Bank System - (group by, having clause) Database:
Create the following table and insert tuples with suitable constraints.
Output:-
Output:-
Output: -
Output: -
To Display all the tuples from all the tables, the statement is,
Output:-
Output:-
Output:-
Output:-
6. Display maximum of loan amount in each branch where the balance is more than 25000.
select b.branch_city, max(l.balance) "Max_loan_Amt"
from branch b, loan l
where l.branch_id=b.branch_id and l.balance in (select l.balance
from loan l, branch b
where l.balance>25000)
group by b.branch_city;
Output:-
Output:-
Output:-
update loan
set balance=26000
where account_no='AE1003996';
Output:-