PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Charges" (
"charge_id" INT,
"charge_amount" DECIMAL(19, 4),
PRIMARY KEY ("charge_id")
);

CREATE TABLE "Dogs" (
"dog_id" INT UNIQUE,
"owner_id" INT,
"name" VARCHAR(50),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id")
);

CREATE TABLE "Owners" (
"owner_id" INT UNIQUE,
"first_name" VARCHAR(50),
"last_name" VARCHAR(50),
PRIMARY KEY ("owner_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"dog_id" INT,
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("dog_id") REFERENCES "Dogs"("dog_id")
);





INSERT INTO "Charges" VALUES ("1", "10.50");
INSERT INTO "Charges" VALUES ("2", "25.00");
INSERT INTO "Charges" VALUES ("3", "5.75");
INSERT INTO "Charges" VALUES ("4", "100.00");
INSERT INTO "Charges" VALUES ("5", "15.20");
INSERT INTO "Charges" VALUES ("6", "30.00");
INSERT INTO "Charges" VALUES ("7", "8.00");
INSERT INTO "Charges" VALUES ("8", "50.00");
INSERT INTO "Charges" VALUES ("9", "12.00");
INSERT INTO "Charges" VALUES ("10", "75.00");
INSERT INTO "Owners" VALUES ("1", "Alice", "Smith");
INSERT INTO "Owners" VALUES ("2", "Bob", "Johnson");
INSERT INTO "Owners" VALUES ("3", "Charlie", "Brown");
INSERT INTO "Owners" VALUES ("4", "Diana", "Miller");
INSERT INTO "Owners" VALUES ("5", "Eve", "Davis");
INSERT INTO "Owners" VALUES ("6", "Frank", "Garcia");
INSERT INTO "Owners" VALUES ("7", "Grace", "Rodriguez");
INSERT INTO "Owners" VALUES ("8", "Henry", "Martinez");
INSERT INTO "Owners" VALUES ("9", "Ivy", "Hernandez");
INSERT INTO "Owners" VALUES ("10", "Jack", "Lopez");
INSERT INTO "Dogs" VALUES ("101", "1", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "Lucy");
INSERT INTO "Dogs" VALUES ("103", "2", "Max");
INSERT INTO "Dogs" VALUES ("104", "3", "Bella");
INSERT INTO "Dogs" VALUES ("105", "3", "Charlie");
INSERT INTO "Dogs" VALUES ("106", "4", "Daisy");
INSERT INTO "Dogs" VALUES ("107", "5", "Rocky");
INSERT INTO "Dogs" VALUES ("108", "6", "Molly");
INSERT INTO "Dogs" VALUES ("109", "7", "Bailey");
INSERT INTO "Dogs" VALUES ("110", "8", "Sadie");
INSERT INTO "Dogs" VALUES ("111", "9", "Cooper");
INSERT INTO "Dogs" VALUES ("112", "10", "Luna");
INSERT INTO "Dogs" VALUES ("113", "1", "Duke");
INSERT INTO "Dogs" VALUES ("114", "2", "Zoe");
INSERT INTO "Dogs" VALUES ("115", "3", "Bear");
INSERT INTO "Treatments" VALUES ("1001", "101", "25.00");
INSERT INTO "Treatments" VALUES ("1002", "101", "10.00");
INSERT INTO "Treatments" VALUES ("1003", "102", "15.00");
INSERT INTO "Treatments" VALUES ("1004", "103", "30.00");
INSERT INTO "Treatments" VALUES ("1005", "104", "50.00");
INSERT INTO "Treatments" VALUES ("1006", "105", "20.00");
INSERT INTO "Treatments" VALUES ("1007", "105", "10.00");
INSERT INTO "Treatments" VALUES ("1008", "105", "5.00");
INSERT INTO "Treatments" VALUES ("1009", "106", "40.00");
INSERT INTO "Treatments" VALUES ("1010", "107", "25.00");
INSERT INTO "Treatments" VALUES ("1011", "108", "15.00");
INSERT INTO "Treatments" VALUES ("1012", "109", "35.00");
INSERT INTO "Treatments" VALUES ("1013", "110", "10.00");
INSERT INTO "Treatments" VALUES ("1014", "111", "20.00");
INSERT INTO "Treatments" VALUES ("1015", "112", "30.00");
INSERT INTO "Treatments" VALUES ("1016", "101", "5.00");
INSERT INTO "Treatments" VALUES ("1017", "103", "10.00");
INSERT INTO "Treatments" VALUES ("1018", "105", "12.00");
INSERT INTO "Treatments" VALUES ("1019", "113", "22.00");
INSERT INTO "Treatments" VALUES ("1020", "113", "8.00");
INSERT INTO "Treatments" VALUES ("1021", "114", "18.00");
INSERT INTO "Treatments" VALUES ("1022", "115", "28.00");
INSERT INTO "Treatments" VALUES ("1023", "115", "7.00");