CREATE TABLE bank (branch_ID NUMBER, bname VARCHAR2, no_of_customers NUMBER, city VARCHAR2, state VARCHAR2)
CREATE TABLE customer (cust_ID VARCHAR2, cust_name VARCHAR2, acc_type CHAR, acc_bal NUMBER, no_of_loans NUMBER, credit_score NUMBER, branch_ID NUMBER, state VARCHAR2)
CREATE TABLE loan (loan_ID VARCHAR2, loan_type VARCHAR2, cust_ID VARCHAR2, branch_ID VARCHAR2, amount NUMBER)

Find the total amount of loans offered by each bank branch, and sort in desc by the total number.
SELECT bname, SUM(amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_ID = T2.branch_ID GROUP BY T1.bname ORDER BY SUM(amount) DESC
SELECT "bname", SUM("amount") FROM "bank" "T1" JOIN "loan" "T2" ON "T1"."branch_ID" = "T2"."branch_ID" GROUP BY "T1"."bname" ORDER BY SUM("amount") DESC