(a) Consider the following Bank database, where the Primary keys are shown in bold. branch (branch_name, branch_city, assets) customer…

(a) Consider the following Bank database, where the Primary keys are shown in bold.

  • branch (branch_name, branch_city, assets)
  • customer (customer_name, customer_street, customer_city)
  • loan (loan_number, branch_name, amount)
  • borrower (customer_name, loan_number)
  • account (account_number, branch_name, balance)
  • depositor (customer_name, account_number)

For the above database, write the following SQL queries.

(i) A query to prepare a list of all customers who have an account at all the branches located in Dhaka

(ii) A query to find out the total loan amount of a branch

(iii) A query to prepare a list of all branches that have assets greater than the asset of at least one branch located in Dhaka

(iv) A query to find out the total loan amount of a customer.

From the BCS Technical Cadre (CSE) October 2025 – 49th BCS Written (Special) (BPSC) exam, question 120 of 123.

More from this paper