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 "constructorResults" (
"constructorResultsId" INT,
"status" TEXT,
PRIMARY KEY ("constructorResultsId")
);

CREATE TABLE "constructorStandings" (
"constructorStandingsId" INT,
"raceId" INT,
"constructorId" INT,
"points" FLOAT,
PRIMARY KEY ("constructorStandingsId"),
FOREIGN KEY ("constructorId") REFERENCES "constructors"("constructorId")
);

CREATE TABLE "constructors" (
"constructorId" INT UNIQUE,
"name" TEXT,
PRIMARY KEY ("constructorId")
);

CREATE TABLE "results" (
"resultId" INT,
"driverId" INT,
"position" INT,
PRIMARY KEY ("resultId")
);



INSERT INTO "constructorResults" VALUES ("1", "Finished");
INSERT INTO "constructorResults" VALUES ("2", "Finished");
INSERT INTO "constructorResults" VALUES ("3", "Finished");
INSERT INTO "constructorResults" VALUES ("4", "Finished");
INSERT INTO "constructorResults" VALUES ("5", "Finished");
INSERT INTO "constructorResults" VALUES ("6", "Retired");
INSERT INTO "constructorResults" VALUES ("7", "Finished");
INSERT INTO "constructorResults" VALUES ("8", "Finished");
INSERT INTO "constructorResults" VALUES ("9", "Finished");
INSERT INTO "constructorResults" VALUES ("10", "Finished");
INSERT INTO "constructors" VALUES ("1", "Mercedes");
INSERT INTO "constructors" VALUES ("2", "Red Bull");
INSERT INTO "constructors" VALUES ("3", "Ferrari");
INSERT INTO "constructors" VALUES ("4", "McLaren");
INSERT INTO "constructors" VALUES ("5", "Aston Martin");
INSERT INTO "constructors" VALUES ("6", "Alpine");
INSERT INTO "constructors" VALUES ("7", "AlphaTauri");
INSERT INTO "constructors" VALUES ("8", "Alfa Romeo");
INSERT INTO "constructors" VALUES ("9", "Haas");
INSERT INTO "constructors" VALUES ("10", "Williams");
INSERT INTO "constructorStandings" VALUES ("1", "1", "1", "50.0");
INSERT INTO "constructorStandings" VALUES ("2", "1", "2", "35.0");
INSERT INTO "constructorStandings" VALUES ("3", "1", "3", "20.0");
INSERT INTO "constructorStandings" VALUES ("4", "2", "1", "45.0");
INSERT INTO "constructorStandings" VALUES ("5", "2", "2", "40.0");
INSERT INTO "constructorStandings" VALUES ("6", "2", "3", "15.0");
INSERT INTO "constructorStandings" VALUES ("7", "3", "1", "60.0");
INSERT INTO "constructorStandings" VALUES ("8", "3", "2", "30.0");
INSERT INTO "constructorStandings" VALUES ("9", "3", "4", "25.0");
INSERT INTO "constructorStandings" VALUES ("10", "4", "1", "55.0");
INSERT INTO "constructorStandings" VALUES ("11", "4", "5", "10.0");
INSERT INTO "constructorStandings" VALUES ("12", "4", "6", "5.0");
INSERT INTO "constructorStandings" VALUES ("13", "5", "1", "70.0");
INSERT INTO "constructorStandings" VALUES ("14", "5", "2", "25.0");
INSERT INTO "constructorStandings" VALUES ("15", "5", "3", "10.0");
INSERT INTO "constructorStandings" VALUES ("16", "6", "1", "40.0");
INSERT INTO "constructorStandings" VALUES ("17", "6", "2", "30.0");
INSERT INTO "constructorStandings" VALUES ("18", "6", "7", "8.0");
INSERT INTO "constructorStandings" VALUES ("19", "7", "1", "65.0");
INSERT INTO "constructorStandings" VALUES ("20", "7", "2", "35.0");
INSERT INTO "constructorStandings" VALUES ("21", "7", "8", "3.0");
INSERT INTO "constructorStandings" VALUES ("22", "8", "1", "50.0");
INSERT INTO "constructorStandings" VALUES ("23", "8", "2", "20.0");
INSERT INTO "constructorStandings" VALUES ("24", "8", "9", "1.0");
INSERT INTO "constructorStandings" VALUES ("25", "9", "1", "75.0");
INSERT INTO "constructorStandings" VALUES ("26", "9", "2", "40.0");
INSERT INTO "constructorStandings" VALUES ("27", "9", "10", "0.0");
INSERT INTO "constructorStandings" VALUES ("28", "10", "1", "80.0");
INSERT INTO "constructorStandings" VALUES ("29", "10", "2", "45.0");
INSERT INTO "constructorStandings" VALUES ("30", "10", "3", "25.0");
INSERT INTO "results" VALUES ("1", "101", "1");
INSERT INTO "results" VALUES ("2", "102", "2");
INSERT INTO "results" VALUES ("3", "103", "3");
INSERT INTO "results" VALUES ("4", "104", "4");
INSERT INTO "results" VALUES ("5", "105", "5");
INSERT INTO "results" VALUES ("6", "106", "6");
INSERT INTO "results" VALUES ("7", "107", "7");
INSERT INTO "results" VALUES ("8", "108", "8");
INSERT INTO "results" VALUES ("9", "109", "9");
INSERT INTO "results" VALUES ("10", "110", "10");