File size: 1,119 Bytes
9e4ab0c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
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;
|