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 "Dogs" (
"dog_id" INT,
"name" VARCHAR(50),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Professionals" (
"professional_id" INT UNIQUE,
"role_code" VARCHAR(10),
"first_name" VARCHAR(50),
"last_name" VARCHAR(50),
PRIMARY KEY ("professional_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"professional_id" INT,
"date_of_treatment" DATETIME,
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Dogs" VALUES ("1", "Buddy");
INSERT INTO "Dogs" VALUES ("2", "Max");
INSERT INTO "Dogs" VALUES ("3", "Bella");
INSERT INTO "Dogs" VALUES ("4", "Lucy");
INSERT INTO "Dogs" VALUES ("5", "Charlie");
INSERT INTO "Dogs" VALUES ("6", "Daisy");
INSERT INTO "Dogs" VALUES ("7", "Rocky");
INSERT INTO "Dogs" VALUES ("8", "Luna");
INSERT INTO "Dogs" VALUES ("9", "Cooper");
INSERT INTO "Dogs" VALUES ("10", "Sophie");
INSERT INTO "Professionals" VALUES ("101", "VET", "Alice", "Smith");
INSERT INTO "Professionals" VALUES ("102", "GROOMER", "Bob", "Johnson");
INSERT INTO "Professionals" VALUES ("103", "TRAINER", "Carol", "Williams");
INSERT INTO "Professionals" VALUES ("104", "VET", "David", "Brown");
INSERT INTO "Professionals" VALUES ("105", "GROOMER", "Eve", "Davis");
INSERT INTO "Professionals" VALUES ("106", "TRAINER", "Frank", "Miller");
INSERT INTO "Professionals" VALUES ("107", "VET", "Grace", "Wilson");
INSERT INTO "Professionals" VALUES ("108", "GROOMER", "Henry", "Moore");
INSERT INTO "Professionals" VALUES ("109", "TRAINER", "Ivy", "Taylor");
INSERT INTO "Professionals" VALUES ("110", "VET", "Jack", "Anderson");
INSERT INTO "Treatments" VALUES ("1", "101", "2023-01-15 10:00:00", "75.50");
INSERT INTO "Treatments" VALUES ("2", "102", "2023-01-16 11:30:00", "40.00");
INSERT INTO "Treatments" VALUES ("3", "103", "2023-01-17 14:00:00", "120.00");
INSERT INTO "Treatments" VALUES ("4", "101", "2023-01-18 09:00:00", "80.25");
INSERT INTO "Treatments" VALUES ("5", "104", "2023-01-19 10:30:00", "90.00");
INSERT INTO "Treatments" VALUES ("6", "102", "2023-01-20 13:00:00", "35.00");
INSERT INTO "Treatments" VALUES ("7", "105", "2023-01-21 15:00:00", "50.00");
INSERT INTO "Treatments" VALUES ("8", "103", "2023-01-22 10:00:00", "110.00");
INSERT INTO "Treatments" VALUES ("9", "104", "2023-01-23 11:00:00", "95.75");
INSERT INTO "Treatments" VALUES ("10", "106", "2023-01-24 14:30:00", "130.00");
INSERT INTO "Treatments" VALUES ("11", "101", "2023-01-25 09:30:00", "70.00");
INSERT INTO "Treatments" VALUES ("12", "107", "2023-01-26 10:00:00", "85.00");
INSERT INTO "Treatments" VALUES ("13", "108", "2023-01-27 11:00:00", "45.00");
INSERT INTO "Treatments" VALUES ("14", "109", "2023-01-28 12:00:00", "100.00");
INSERT INTO "Treatments" VALUES ("15", "110", "2023-01-29 13:00:00", "60.00");
INSERT INTO "Treatments" VALUES ("16", "101", "2023-01-30 14:00:00", "72.00");
INSERT INTO "Treatments" VALUES ("17", "102", "2023-01-31 15:00:00", "38.00");
INSERT INTO "Treatments" VALUES ("18", "104", "2023-02-01 10:00:00", "92.00");
INSERT INTO "Treatments" VALUES ("19", "105", "2023-02-02 11:00:00", "55.00");
INSERT INTO "Treatments" VALUES ("20", "107", "2023-02-03 12:00:00", "88.00");
INSERT INTO "Treatments" VALUES ("21", "101", "2023-02-04 13:00:00", "65.00");
INSERT INTO "Treatments" VALUES ("22", "102", "2023-02-05 14:00:00", "30.00");
INSERT INTO "Treatments" VALUES ("23", "103", "2023-02-06 15:00:00", "115.00");
INSERT INTO "Treatments" VALUES ("24", "104", "2023-02-07 16:00:00", "98.00");
INSERT INTO "Treatments" VALUES ("25", "105", "2023-02-08 17:00:00", "48.00");
INSERT INTO "Treatments" VALUES ("26", "106", "2023-02-09 18:00:00", "125.00");
INSERT INTO "Treatments" VALUES ("27", "107", "2023-02-10 09:00:00", "82.00");
INSERT INTO "Treatments" VALUES ("28", "108", "2023-02-11 10:00:00", "42.00");
INSERT INTO "Treatments" VALUES ("29", "109", "2023-02-12 11:00:00", "105.00");
INSERT INTO "Treatments" VALUES ("30", "110", "2023-02-13 12:00:00", "62.00");