|
CREATE TABLE "bank" ( |
|
"branch_id" integer, |
|
"bname" text, |
|
"no_of_customers" integer, |
|
"city" text, |
|
"state" text |
|
); |
|
|
|
INSERT INTO bank VALUES (1, "morningside", 203, "new york city", "new york"); |
|
INSERT INTO bank VALUES (2, "downtown", 123, "salt lake city", "utah"); |
|
INSERT INTO bank VALUES (3, "broadway", 453, "new york city", "new york"); |
|
INSERT INTO bank VALUES (4, "high", 367, "austin", "texas"); |
|
|
|
CREATE TABLE "customer" ( |
|
"cust_id" text, |
|
"cust_name" text, |
|
"acc_type" text, |
|
"acc_bal" integer, |
|
"no_of_loans" integer, |
|
"credit_score" integer, |
|
"branch_id" integer, |
|
"state" text |
|
); |
|
|
|
INSERT INTO customer VALUES ("1", "mary", "saving", 2000, 2, 30, 2, "utah"); |
|
INSERT INTO customer VALUES ("2", "jack", "checking", 1000, 1, 20, 1, "texas"); |
|
INSERT INTO customer VALUES ("3", "owen", "saving", 800000, 0, 210, 3, "new york"); |
|
|
|
CREATE TABLE "loan" ( |
|
"loan_id" text, |
|
"loan_type" text, |
|
"cust_id" text, |
|
"branch_id" text, |
|
"amount" integer |
|
); |
|
|
|
INSERT INTO loan VALUES ("1", "mortgages", "1", "1", 2050); |
|
INSERT INTO loan VALUES ("2", "auto", "1", "2", 3000); |
|
INSERT INTO loan VALUES ("3", "business", "3", "3", 5000); |
|
|
|
|
|
COMMIT; |
|
|