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 "employee" (
"Employee_ID" INT UNIQUE,
"Name" TEXT,
"Age" INT,
PRIMARY KEY ("Employee_ID")
);

CREATE TABLE "evaluation" (
"Employee_ID" TEXT,
"Year_awarded" TEXT,
"Bonus" FLOAT,
PRIMARY KEY ("Employee_ID", "Year_awarded"),
FOREIGN KEY ("Employee_ID") REFERENCES "employee"("Employee_ID")
);

CREATE TABLE "hiring" (
"Employee_ID" INT,
"Start_from" TEXT,
PRIMARY KEY ("Employee_ID")
);





INSERT INTO "employee" VALUES ("1", "Alice", "30");
INSERT INTO "employee" VALUES ("2", "Bob", "35");
INSERT INTO "employee" VALUES ("3", "Charlie", "28");
INSERT INTO "employee" VALUES ("4", "David", "40");
INSERT INTO "employee" VALUES ("5", "Eve", "25");
INSERT INTO "employee" VALUES ("6", "Frank", "50");
INSERT INTO "employee" VALUES ("7", "Grace", "32");
INSERT INTO "employee" VALUES ("8", "Heidi", "45");
INSERT INTO "evaluation" VALUES ("1", "2020", "1000.0");
INSERT INTO "evaluation" VALUES ("1", "2021", "1200.0");
INSERT INTO "evaluation" VALUES ("2", "2020", "1500.0");
INSERT INTO "evaluation" VALUES ("4", "2019", "800.0");
INSERT INTO "evaluation" VALUES ("4", "2020", "900.0");
INSERT INTO "evaluation" VALUES ("6", "2022", "2000.0");
INSERT INTO "evaluation" VALUES ("7", "2021", "1100.0");
INSERT INTO "hiring" VALUES ("1", "2019-01-15");
INSERT INTO "hiring" VALUES ("2", "2018-03-01");
INSERT INTO "hiring" VALUES ("3", "2022-06-01");
INSERT INTO "hiring" VALUES ("4", "2017-11-20");
INSERT INTO "hiring" VALUES ("5", "2023-01-10");
INSERT INTO "hiring" VALUES ("6", "2015-07-01");
INSERT INTO "hiring" VALUES ("7", "2020-09-15");
INSERT INTO "hiring" VALUES ("8", "2016-04-01");